ag_switch fix