fix file upload bug