Fixed a bug in the upload processing