wavetable mem leak fix