Fix bug with LocalSearch.