Fixed some bugs in search
Fixed some bugs in search