Silly bug in resample.py.