fix a URL validation bug