Fix the HostSwitch example

Thanks to Tobias Schwarz for reporting problems!