Fixes for the switch command