fixed indexing error in triangle intersection