fix allowed_ip bug