Improve IPv6 handling