Minor fixes to file uploads