set l.max in sphere_ray