fixed incrementing wave counter