fix resample