Fixed warnings and bug with a nested loop in Triangles