fixed the end of the wave times to actually extract the waveform