Fix bug where search input change triggered unwanted effects.