fix bug in Search plugin