Fixed bug in determining ray hit points