fix: use correct host name if client's url contains a port