diff --git a/src/automations/tickets/create.ts b/src/automations/tickets/create.ts
index 1fd743b..fd0ae57 100644
--- a/src/automations/tickets/create.ts
+++ b/src/automations/tickets/create.ts
@@ -118,6 +118,11 @@
         allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
         type: "member"
     }] as Discord.OverwriteResolvable[];
+    overwrites.push({
+        id: interaction.guild.roles.everyone,
+        deny: ["VIEW_CHANNEL"],
+        type: "role"
+    })
     if (config.tickets.supportRole != null) {
         overwrites.push({
             id: interaction.guild.roles.cache.get(config.tickets.supportRole),
diff --git a/src/automations/tickets/delete.ts b/src/automations/tickets/delete.ts
index 8feeb4b..32315bc 100644
--- a/src/automations/tickets/delete.ts
+++ b/src/automations/tickets/delete.ts
@@ -9,10 +9,10 @@
 
     let config = await readConfig(interaction.guild.id);
     let channel = (interaction.channel as Discord.TextChannel)
-    if (config.tickets.category != channel.parent.id) {
+    if (!channel.parent || config.tickets.category != channel.parent.id) {
         return interaction.reply({embeds: [new generateEmojiEmbed()
             .setTitle("Close Ticket")
-            .setDescription("This ticket is not in your tickets category, so cannot be deleted.")
+            .setDescription("This ticket is not in your tickets category, so cannot be deleted. You cannot run close in a thread.") // TODO bridge to cross later!
             .setStatus("Danger")
             .setEmoji("CONTROL.BLOCKCROSS")
         ], ephemeral: true});
@@ -56,7 +56,26 @@
             .setEmoji("GUILD.TICKET.ARCHIVED")
         ]});
         setTimeout(async () =>{
-            channel.permissionsFor(await interaction.guild.members.fetch(channel.topic.split(" ")[0])).remove("VIEW_CHANNEL");
+            let overwrites = [
+                {
+                    id: channel.topic.split(" ")[0],
+                    deny: ["VIEW_CHANNEL"],
+                    type: "member"
+                },
+                {
+                    id: interaction.guild.id,
+                    deny: ["VIEW_CHANNEL"],
+                    type: "role"
+                }
+            ] as Discord.OverwriteResolvable[];
+            if (config.tickets.supportRole != null) {
+                overwrites.push({
+                    id: interaction.guild.roles.cache.get(config.tickets.supportRole),
+                    allow: ["VIEW_CHANNEL", "SEND_MESSAGES", "ATTACH_FILES", "ADD_REACTIONS", "READ_MESSAGE_HISTORY"],
+                    type: "role"
+                })
+            }
+            channel.edit({permissionOverwrites: overwrites})
             channel.setTopic(`${channel.topic.split(" ")[0]} Archived`);
             let data = {
                 meta:{
@@ -98,6 +117,7 @@
     let config = await readConfig(guild.id);
     if (!config.tickets.category) return;
     let tickets = guild.channels.cache.get(config.tickets.category);
+    if (!tickets) return;
     let ticketChannels = tickets.children;
     let deleted = 0
     ticketChannels.forEach(element => {
