added code to prevent ipv6