bug fix in search