Use message loop hotswapping instead of a state flag