fixed a counting bug