fix typo in has_ip()