Search button was clearing the search entry preemptively