fix for ray intersect