Counter bugfix