bugfix: find correct nearest point of polygons