Fix the server url determination