counting fix