Cosmetic fixes to switch logic