fixed a bug in URL checks