Fix bug in upload resume behavior