fix bug with scheme transposing and default ports for http uris