Fix counter problem.