fix some bug in search