bug fix when uploading more than one file in a row