Switch functionality fixes.