Replaced deprecated has_key.