Fix connecting when host is specified with protocol prefix e.g. ssl://