Fix bad reset while failing file upload