reset counter when overflow