Fixed bad case check.