fixed up the stat counter