fixed problems with hostnames and ports