fixed bug in intersectsOnRay