Correctly detecting ipv6 addresses.
Fix #15