fixed crash when rendering waveform