Improving search logic.