Fix bug in the upload command