fix waveFront bug