Bugfix for upload.py