More fixes for file uploads