Fixed main issues of SwitchManager