Fixed parsing of urls