making waveform highlight work on initial load