Fixed incorrect controlled counter