more bugfixes to the counter
recompile