bug fix in resuming transfer