fixed error with urlparse call