fixing counter v1.40