fixed GrahmScan bug when called on a polygon