Make SwitchMode works when the module is not loaded