Fixed bug in Search()