critical bugfix where putWave was never called