fixed bug in search