Initial Commit SmartSwitch

Bugfix short circuit