Fixed some file upload issues