diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
index fe11ee1..d1bbd9b 100644
--- a/src/events/guildMemberUpdate.ts
+++ b/src/events/guildMemberUpdate.ts
@@ -87,6 +87,7 @@
             await log(data);
         }
     }
+    if (before.displayAvatarURL !== after.displayAvatarURL) await doMemberChecks(after);
     const auditLog = (await getAuditLog(after.guild, AuditLogEvent.MemberUpdate)).filter(
         (entry: GuildAuditLogsEntry) => (entry.target as GuildMember)!.id === after.id
     )[0];
@@ -125,7 +126,6 @@
         };
         await log(data);
     }
-    if (before.displayAvatarURL !== after.displayAvatarURL) await doMemberChecks(after);
     if (
         (before.communicationDisabledUntilTimestamp ?? 0) < Date.now() &&
         new Date(after.communicationDisabledUntil ?? 0).getTime() > Date.now()
diff --git a/src/reflex/scanners.ts b/src/reflex/scanners.ts
index acd3b41..93af960 100644
--- a/src/reflex/scanners.ts
+++ b/src/reflex/scanners.ts
@@ -12,9 +12,7 @@
 import getEmojiByName from "../utils/getEmojiByName.js";
 import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js";
 import config from "../config/main.js";
-import GIFEncoder from "gifencoder";
-import gm_var from 'gm';
-const gm = gm_var.subClass({ imageMagick: '7+' });
+import gm from 'gm';
 
 interface NSFWSchema {
     nsfw: boolean;
@@ -34,7 +32,6 @@
 
 export async function testNSFW(attachment: {
     url: string;
-    local: string;
     height: number | null;
     width: number | null;
 }): Promise<NSFWSchema> {
@@ -44,12 +41,12 @@
         return { nsfw: alreadyHaveCheck.nsfw }
     };
 
-    const image = gm(fileStream).command('convert').in('-')
+    const converted = await new Promise((resolve, reject) => gm(fileStream).command("convert").toBuffer("PNG", (err, buf) => {
+        if (err) return reject(err);
+        resolve(buf);
+    })) as Buffer;
+    const array = new Uint8Array(converted);
 
-    const encoder = new GIFEncoder(attachment.width ?? 1024, attachment.height ?? 1024);
-
-
-    // const array = new Uint8Array(fileStream);
     const img = tf.node.decodeImage(array) as tf.Tensor3D;
 
     const predictions = (await nsfw_model.classify(img, 1))[0]!;
@@ -156,7 +153,6 @@
 
 export async function NSFWCheck(element: {
     url: string;
-    local: string;
     height: number | null;
     width: number | null;
 }): Promise<boolean> {
@@ -238,7 +234,7 @@
     // Is the profile picture NSFW
     const avatar = member.displayAvatarURL({ extension: "png", size: 1024, forceStatic: true });
     const avatarCheck =
-        guildData.filters.images.NSFW && (await NSFWCheck({url: avatar, local: "", height: 1024, width: 1024}));
+        guildData.filters.images.NSFW && (await NSFWCheck({url: avatar, height: 1024, width: 1024}));
     console.log(5, avatarCheck)
     // Does the username contain an invite
     const inviteCheck = guildData.filters.invite.enabled && /discord\.gg\/[a-zA-Z0-9]+/gi.test(member.user.username);
diff --git a/src/reflex/verify.ts b/src/reflex/verify.ts
index 540fb4d..8f68c0e 100644
--- a/src/reflex/verify.ts
+++ b/src/reflex/verify.ts
@@ -121,9 +121,11 @@
             ]
         });
         if (
-            await NSFWCheck(
-                (interaction.member as GuildMember).user.displayAvatarURL({ extension: "png", forceStatic: true })
-            )
+            await NSFWCheck({
+                url: (interaction.member as GuildMember).user.displayAvatarURL({ extension: "png", forceStatic: true }),
+                height: 1024,
+                width: 1024,
+            })
         ) {
             return await interaction.editReply({
                 embeds: [
