Fix wrong counter