Fixed an error when file is completed uploading