resampler bug fix

fixes issue 28