fix rollover problem in timer class