fixed problem in resumable download when there is an error in the data (causing the size to not stop growing)