Added IPv6 support (hopefully)