Added some error checking and repair of incomplete Url when searching.