fixed bug in triangle intersection code