Fix bug in polygon intersections
Merge pull request #1762 from manuel-freire/poly-intersection

Fix bug in polygon intersections