Fix the URL exists function.