small fix for legacy_switch