fix for hostname and port