fixed bugs in intersect calculation and in shoot ray