bugfix: closest point calculation with segmentpoints included