Small changes in search logic.