fixing triangulate