issue #5 fixes counter