Fix bug causing in-progress uploads to be marked as failed