Fixed deprecated has_key