correction of scaling factors to number of residuals