Fix port number / dynamic URL for socket.