fix bug related to file upload