fix for timer bug