fix usage of URL object.