fix search bug