fix bug for uploading multiple files