Fixed search crashing bug