Fixes single file upload, uncovers some more errors