Add containSwitch check for flow