fix url detection