Work around for port duplication in generated URLs.