Fix bug with flipped triangles.