fixed wrong file uploading issue