fixing a switched inequality