Bug fixes on the upload commands