Fix run loop