file upload bug fixing