ofPolyline getResampledByCount unpredictable behavior

I’m using ofPolyline getResampledByCount to subdivide a path in equal parts, but sometimes it makes a closed path (first and last points at the same location) and sometimes an opened path (equidistant points in all path).
is there a way of subdividing it equally all the time?
Thank you

EDIT: 0.8.4 in OS X