Fix negative counter number issue