Fixed the logic of the search points