SwitchBugFix!

Some bugs fixed.