fixed deprecated case check