Fixed bug with creating counters