diff --git "a/pages/nucleus/transcript/\133code\135/human.js" "b/pages/nucleus/transcript/\133code\135/human.js"
index 89d2370..6af671e 100644
--- "a/pages/nucleus/transcript/\133code\135/human.js"
+++ "b/pages/nucleus/transcript/\133code\135/human.js"
@@ -13,7 +13,7 @@
     }
     let code;
     try {
-        code = (await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/transcript/${ctx.params.code}?key=${ctx.query.key}&iv=${ctx.query.iv}`))
+        code = (await Axios.get(`${process.env.NUCLEUS_CALLBACK}transcript/${ctx.params.code}?key=${ctx.query.key}&iv=${ctx.query.iv}`))
     } catch (e) {
         return {
             redirect: {
@@ -24,7 +24,7 @@
     }
     return {
         redirect: {
-            destination: `http://${process.env.NUCLEUS_CALLBACK}/transcript/${ctx.params.code}?key=${ctx.query.key}&iv=${ctx.query.iv}/human`,
+            destination: `${process.env.NUCLEUS_CALLBACK}transcript/${ctx.params.code}?key=${ctx.query.key}&iv=${ctx.query.iv}/human`,
             permanent: true
         }
     }
diff --git "a/pages/nucleus/transcript/\133code\135/index.js" "b/pages/nucleus/transcript/\133code\135/index.js"
index a08bf0c..3fc2ed6 100644
--- "a/pages/nucleus/transcript/\133code\135/index.js"
+++ "b/pages/nucleus/transcript/\133code\135/index.js"
@@ -27,7 +27,7 @@
         for (let i = 0; i < users.length; i++) {
             const user = users[i];
             const userID = user.replaceAll(/\D/g, '');
-            const username = (await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/users/${userID}`)).data;
+            const username = (await Axios.get(`${process.env.NUCLEUS_CALLBACK}users/${userID}`)).data;
             dict["users"][user.replaceAll(/<@|>/g, '')] = username;
         }
     }
@@ -36,7 +36,7 @@
         for (let i = 0; i < channels.length; i++) {
             const channel = channels[i];
             const channelID = channel.replaceAll(/\D/g, '');
-            const channelName = (await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/channels/${channelID}`)).data;
+            const channelName = (await Axios.get(`${process.env.NUCLEUS_CALLBACK}channels/${channelID}`)).data;
             dict["channels"][channel] = channelName;
         }
     }
@@ -132,32 +132,35 @@
             }
         }
     }
-    return {
+    /*return {
         redirect: {
             destination: `/nucleus/transcript/${ctx.params.code}/human?key=${ctx.query.key}&iv=${ctx.query.iv}`,
             permanent: true
         }
+    }*/
+    let code;
+    console.log("getting props")
+    try {
+        code = (await Axios.get(`${process.env.NUCLEUS_CALLBACK}transcript/${ctx.params.code}?key=${ctx.query.key}&iv=${ctx.query.iv}`));
+    } catch (e) {
+	console.log(e)
+	console.log(`${process.env.NUCLEUS_CALLBACK}transcript/${ctx.params.code}?key=${ctx.query.key}&iv=${ctx.query.iv}`)
+        return {
+            redirect: {
+                destination: '/nucleus/transcript/invalid',
+                permanent: true
+            }
+        }
     }
-    // let code;
-    // try {
-    //     code = (await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/transcript/${ctx.params.code}?key=${ctx.query.key&iv=${ctx.query.iv}`))
-    // } catch (e) {
-    //     return {
-    //         redirect: {
-    //             destination: '/nucleus/transcript/invalid',
-    //             permanent: true
-    //         }
-    //     }
-    // }
-    // const linkedData = await parse(code.data.messages)
+    const linkedData = await parse(code.data.messages)
 
-    // const channelName = (await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/channels/${code.data.channel}`)).data;
+    const channelName = (await Axios.get(`${process.env.NUCLEUS_CALLBACK}channels/${code.data.channel}`)).data;
 
-    // return {
-    //     props: {
-    //         data: code.data,
-    //         linkedData,
-    //         channelName
-    //     }
-    // }
+    return {
+        props: {
+            data: code.data,
+            linkedData,
+            channelName
+        }
+    }
 }
diff --git "a/pages/nucleus/transcript/\133code\135/raw.js" "b/pages/nucleus/transcript/\133code\135/raw.js"
index da6ac40..f06c64f 100644
--- "a/pages/nucleus/transcript/\133code\135/raw.js"
+++ "b/pages/nucleus/transcript/\133code\135/raw.js"
@@ -14,7 +14,7 @@
     }
     let code;
     try {
-        code = (await Axios.get(`http://${process.env.NUCLEUS_CALLBACK}/transcript/${ctx.params.code}`))
+        code = (await Axios.get(`${process.env.NUCLEUS_CALLBACK}transcript/${ctx.params.code}`))
     } catch (e) {
         return {
             redirect: {
@@ -25,8 +25,8 @@
     }
     return {
         redirect: {
-            destination: `http://${process.env.NUCLEUS_CALLBACK}/transcript/${ctx.params.code}`,
+            destination: `${process.env.NUCLEUS_CALLBACK}transcript/${ctx.params.code}`,
             permanent: true
         }
     }
-}
\ No newline at end of file
+}
