Fix run loop issue