change counter setup to avoid 1Hz error