Applied a crude fix to make the switcher work again. It will make some
unnecessary calculations, but at least it will (should) work.