Fix issue #121, fix bug when trying to connect to local with ipv6 instead of 4