Triangle debugged