Fixed search to work with delete