Small fixes to file upload.