diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts
index 38c7674..cc69bf0 100644
--- a/src/events/messageCreate.ts
+++ b/src/events/messageCreate.ts
@@ -114,7 +114,7 @@
                 if (
                     config.filters.images.NSFW &&
                     !(message.channel instanceof ThreadChannel ? message.channel.parent?.nsfw : message.channel.nsfw) &&
-                    (await NSFWCheck(element))
+                    (await NSFWCheck(element.url))
                 ) {
                     messageException(message.guild.id, message.channel.id, message.id);
                     await message.delete();
diff --git a/src/reflex/scanners.ts b/src/reflex/scanners.ts
index 74887d2..8b8d3c8 100644
--- a/src/reflex/scanners.ts
+++ b/src/reflex/scanners.ts
@@ -30,12 +30,8 @@
     }
 });
 
-export async function testNSFW(attachment: {
-    url: string;
-    height: number | null;
-    width: number | null;
-}): Promise<NSFWSchema> {
-    const [fileStream, hash] = await streamAttachment(attachment.url);
+export async function testNSFW(url: string): Promise<NSFWSchema> {
+    const [fileStream, hash] = await streamAttachment(url);
     const alreadyHaveCheck = await client.database.scanCache.read(hash);
     if (alreadyHaveCheck && "nsfw" in alreadyHaveCheck!) {
         return { nsfw: alreadyHaveCheck.nsfw };
@@ -49,11 +45,11 @@
                 resolve(buf);
             })
     )) as Buffer;
-    const array = new Uint8Array(converted);
 
-    const img = tf.node.decodeImage(array) as tf.Tensor3D;
+    const img = tf.node.decodeImage(converted, 3, undefined, false) as tf.Tensor3D;
 
     const predictions = (await nsfw_model.classify(img, 1))[0]!;
+    img.dispose();
     console.log(2, predictions);
 
     const nsfw = predictions.className === "Hentai" || predictions.className === "Porn";
@@ -155,13 +151,9 @@
     return detectionsTypes as string[];
 }
 
-export async function NSFWCheck(element: {
-    url: string;
-    height: number | null;
-    width: number | null;
-}): Promise<boolean> {
+export async function NSFWCheck(url: string): Promise<boolean> {
     try {
-        return (await testNSFW(element)).nsfw;
+        return (await testNSFW(url)).nsfw;
     } catch (e) {
         console.log(e);
         return false;
@@ -237,7 +229,7 @@
     console.log(4, avatarTextCheck);
     // 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, height: 1024, width: 1024 }));
+    const avatarCheck = guildData.filters.images.NSFW && (await NSFWCheck(avatar));
     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 bdf4aba..540fb4d 100644
--- a/src/reflex/verify.ts
+++ b/src/reflex/verify.ts
@@ -121,11 +121,9 @@
             ]
         });
         if (
-            await NSFWCheck({
-                url: (interaction.member as GuildMember).user.displayAvatarURL({ extension: "png", forceStatic: true }),
-                height: 1024,
-                width: 1024
-            })
+            await NSFWCheck(
+                (interaction.member as GuildMember).user.displayAvatarURL({ extension: "png", forceStatic: true })
+            )
         ) {
             return await interaction.editReply({
                 embeds: [
