fix first point bug on polygon