Fix triangulation bug