Fixed bug in ray caster.