Fixed counting of highs and lows.