fixes max dist in pointset