fixed ray trace bug