bugfix on cycle counter