Fixed another bug dealing with incorrectly adding port numbers to urls.