Fixing triangle bugs"