Two small errors on file upload