Fixed bug in Waveform that made that last output value was always 0.