Fix parsing of urls