Modify host check for IPv6 compatibility