fixed a check for switch labels