file upload fixes