fixes timer bug