fixed counter bug in chrome