Fixed an issue with statistics counters