Fixed search function.