fixes to waveform generator