fix handling of urls