Fix search bug