fix bug in search;