fix timer bug in demo mode