Minor efficiency tweak for kappa.