fix a timer bug