Fix critical bug in uploader causing crashes