diff --git a/controllers/uploadController.js b/controllers/uploadController.js
index 94eb9a8..ee8cc19 100644
--- a/controllers/uploadController.js
+++ b/controllers/uploadController.js
@@ -98,7 +98,7 @@ uploadsController.actuallyUpload = async (req, res, userid, album) => {
             hash: fileHash,
             ip: req.ip,
             albumid: album,
-            userid: userid ? userid.id : null,
+            userid: userid !== undefined ? userid.id : null,
             timestamp: Math.floor(Date.now() / 1000)
           })
         } else {