handling invalid URLs.