Fixed set bug in triangulation code.