fix for nonconsecutive wavemarks