fixed counting bug