fixes file uploads when file is empty