fixed the magnitude math problem
fixing ray bug