fixed bug where urlparse expected string not URL object.