avoid infinite loop in timer_run