fixed a bug that could incorrectly report not a triangle