Small bugfix for spikes near end of sample