Fixed a bug on the counters.