fixed bug with search

tadaa