Fixed bug in xsearch.