[#360] fix errors with counter names; avoid negative counters