diff --git a/src/commands/settings/automod.ts b/src/commands/settings/automod.ts
index 0d9188a..fdf806b 100644
--- a/src/commands/settings/automod.ts
+++ b/src/commands/settings/automod.ts
@@ -410,37 +410,37 @@
                 }
                 case "allowedUsers": {
                     await i.deferUpdate();
-                    current.allowed.users = await toSelectMenu(
+                    current.allowed.users = _.cloneDeep(await toSelectMenu(
                         interaction,
                         m,
                         current.allowed.users,
                         "member",
                         "Word Filter"
-                    );
+                    ));
                     unsavedChanges = true;
                     break;
                 }
                 case "allowedRoles": {
                     await i.deferUpdate();
-                    current.allowed.roles = await toSelectMenu(
+                    current.allowed.roles = _.cloneDeep(await toSelectMenu(
                         interaction,
                         m,
                         current.allowed.roles,
                         "role",
                         "Word Filter"
-                    );
+                    ));
                     unsavedChanges = true;
                     break;
                 }
                 case "allowedChannels": {
                     await i.deferUpdate();
-                    current.allowed.channels = await toSelectMenu(
+                    current.allowed.channels = _.cloneDeep(await toSelectMenu(
                         interaction,
                         m,
                         current.allowed.channels,
                         "channel",
                         "Word Filter"
-                    );
+                    ));
                     unsavedChanges = true;
                     break;
                 }
@@ -556,35 +556,35 @@
             await i.deferUpdate();
             switch (i.values[0]) {
                 case "users": {
-                    current.allowed.users = await toSelectMenu(
+                    current.allowed.users = _.cloneDeep(await toSelectMenu(
                         interaction,
                         m,
                         current.allowed.users,
                         "member",
                         "Invite Settings"
-                    );
+                    ));
                     unsavedChanges = true;
                     break;
                 }
                 case "roles": {
-                    current.allowed.roles = await toSelectMenu(
+                    current.allowed.roles = _.cloneDeep(await toSelectMenu(
                         interaction,
                         m,
                         current.allowed.roles,
                         "role",
                         "Invite Settings"
-                    );
+                    ));
                     unsavedChanges = true;
                     break;
                 }
                 case "channels": {
-                    current.allowed.channels = await toSelectMenu(
+                    current.allowed.channels = _.cloneDeep(await toSelectMenu(
                         interaction,
                         m,
                         current.allowed.channels,
                         "channel",
                         "Invite Settings"
-                    );
+                    ));
                     unsavedChanges = true;
                     break;
                 }
@@ -803,13 +803,13 @@
                         }
                         case "roles": {
                             await i.deferUpdate();
-                            current.allowed.rolesToMention = await toSelectMenu(
+                            current.allowed.rolesToMention = _.cloneDeep(await toSelectMenu(
                                 interaction,
                                 m,
                                 current.allowed.rolesToMention,
                                 "role",
                                 "Mention Settings"
-                            );
+                            ));
                             unsavedChanges = true;
                             break;
                         }
@@ -820,35 +820,35 @@
                     await i.deferUpdate();
                     switch (i.values[0]) {
                         case "users": {
-                            current.allowed.users = await toSelectMenu(
+                            current.allowed.users = _.cloneDeep(await toSelectMenu(
                                 interaction,
                                 m,
                                 current.allowed.users,
                                 "member",
                                 "Mention Settings"
-                            );
+                            ));
                             unsavedChanges = true;
                             break;
                         }
                         case "roles": {
-                            current.allowed.roles = await toSelectMenu(
+                            current.allowed.roles = _.cloneDeep(await toSelectMenu(
                                 interaction,
                                 m,
                                 current.allowed.roles,
                                 "role",
                                 "Mention Settings"
-                            );
+                            ));
                             unsavedChanges = true;
                             break;
                         }
                         case "channels": {
-                            current.allowed.channels = await toSelectMenu(
+                            current.allowed.channels = _.cloneDeep(await toSelectMenu(
                                 interaction,
                                 m,
                                 current.allowed.channels,
                                 "channel",
                                 "Mention Settings"
-                            );
+                            ));
                             unsavedChanges = true;
                             break;
                         }
@@ -1004,24 +1004,24 @@
                 case "allowed": {
                     switch (i.values[0]) {
                         case "users": {
-                            current.allowed.users = await toSelectMenu(
+                            current.allowed.users = _.cloneDeep(await toSelectMenu(
                                 interaction,
                                 m,
                                 current.allowed.users,
                                 "member",
                                 "Mention Settings"
-                            );
+                            ));
                             unsavedChanges = true;
                             break;
                         }
                         case "roles": {
-                            current.allowed.roles = await toSelectMenu(
+                            current.allowed.roles = _.cloneDeep(await toSelectMenu(
                                 interaction,
                                 m,
                                 current.allowed.roles,
                                 "role",
                                 "Mention Settings"
-                            );
+                            ));
                             unsavedChanges = true;
                             break;
                         }
