Fixed connection problem when using IPv6