fixed bug with search (again)