Fix empty search bug