fix broken file upload