fixes for smooth counting