bug fix in resample