fixed error with malformed URLS