fixed performance issue while searching a target