diff --git a/src/pages/rules.tsx b/src/pages/rules.tsx
index 37b6b16543ec3d71ab749661112fb4c6ae95ad97..be63f42393c3cd5eea4eac8aca14f531cb9f31e0 100644
--- a/src/pages/rules.tsx
+++ b/src/pages/rules.tsx
@@ -1,4 +1,4 @@
-import { useState } from "react";
+import { useRef, useState } from "react";
 import useSWR, { useSWRConfig } from "swr";
 import { Box, Button, Grid, TextField, Typography } from "@mui/material";
 import {
@@ -28,13 +28,19 @@ const RulesPage = () => {
       .finally(() => setDisabled(false));
   };
 
+  const lockRef = useRef(false);
   const onProfileChange = (index: number) => {
+    if (lockRef.current) return;
+    lockRef.current = true;
     putProfiles(index)
       .then(() => {
         mutate("getProfiles", { ...profiles, current: index }, true);
       })
       .catch((err) => {
         console.error(err);
+      })
+      .finally(() => {
+        lockRef.current = false;
       });
   };