Fix removed deprecated has_key? syntax