Fixed frequence count bug