Fixed bug when uploading a single file