Correctly send request when query is not empty and current search engine changes