Fixed autodetect of urls