Added exception handling for IPv6