Fix kappa coefficient calculation during stress tests