Fixed selection waveform bug