fixes to FitRays