fixes index use in Convex Hull in 2D case