Fixed bug with PointToPoly function