Fixed problem with SwitchGroup function