Fix a bug in the URL validation