correct bug in triangle orientation