diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 613b48c..7d54674 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -183,7 +183,7 @@
             let component;
             try {
                 component = await m.awaitMessageComponent({
-                    filter: (m) => m.user.id === this.interaction.user.id && m.channel!.id === this.interaction.channel!.id,
+                    filter: (i) => i.user.id === this.interaction.user.id && i.channel!.id === this.interaction.channel!.id && i.id === m.id,
                     time: 300000
                 });
             } catch (e) {
@@ -287,7 +287,7 @@
             await this.interaction.editReply({
                 embeds: [new EmojiEmbed()
                     .setTitle(this.title)
-                    .setDescription(this.failedMessage ?? "")
+                    .setDescription(this.failedMessage ?? "*Message timed out*")
                     .setStatus(this.failedStatus ?? "Danger")
                     .setEmoji(this.failedEmoji ?? this.redEmoji ?? this.emoji)
                 ], components: []
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 1e8e990..3d4ca78 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -67,7 +67,6 @@
         value: any,
         innerKey?: string | null
     ) {
-        console.log(Array.isArray(value));
         if (innerKey) {
             await this.guilds.updateOne(
                 { id: guild },
@@ -191,6 +190,10 @@
         const entry = await this.modNotes.findOne({ guild: guild, user: user });
         return entry?.note ?? null;
     }
+
+    async delete(guild: string) {
+        await this.modNotes.deleteMany({ guild: guild });
+    }
 }
 
 export class Premium {
@@ -204,7 +207,18 @@
         const entry = await this.premium.findOne({
             appliesTo: { $in: [guild] }
         });
-        return entry !== null;
+        if (!entry) return false;
+        return entry.expires.valueOf() > Date.now();
+    }
+
+    async fetchTotal(user: string): Promise<number> {
+        const entry = await this.premium.findOne({ user: user });
+        if (!entry) return 0;
+        return entry.appliesTo.length;
+    }
+
+    setPremium(user: string, guild: string) {
+        return this.premium.updateOne({ user: user }, { $addToSet: { appliesTo: guild } }, { upsert: true });
     }
 }
 
diff --git a/src/utils/dualCollector.ts b/src/utils/dualCollector.ts
index 64e87b8..f55716e 100644
--- a/src/utils/dualCollector.ts
+++ b/src/utils/dualCollector.ts
@@ -60,15 +60,17 @@
                 })
                 .on("collect", async (i: ButtonInteraction) => {
                     mod.stop();
-                    if (!i.deferred) await i.deferUpdate();
+                    int.stop();
+                    await i.deferUpdate();
                     resolve(i);
                 });
             const mod = new InteractionCollector(client as Client, {
-                filter: (i: Interaction) => modalFilter(i),
+                filter: (i: Interaction) => modalFilter(i) && i.isModalSubmit(),
                 time: 300000
             }).on("collect", async (i: ModalSubmitInteraction) => {
                 int.stop();
-                if (!i.deferred) await i.deferUpdate();
+                mod.stop();
+                await i.deferUpdate();
                 resolve(i);
             });
         });
