fixing counter statements