fix bug when adding an empty search string