fixes the switch checks