Fixed search so its less fragile