Use hack to prevent recursion in `event_loop`