fix the wrong logic of search function in Executor