fixed counter issue