Fix bug in uploader