fixes for file upload