fix problem when UploadFile()