Fixed triangulation bugs