triangle bugfix