Fixed triangle index bug

Triangle index was not incremented each loop iteration