Fixed issue when passing host name to connect API.