[BUGFIX] Correct a few upload-related bugs