search bug fixing