fix bad search bug