Fixed the triangle drawing code.