fixed the bug with file upload twice