fixes search bug