Fix a bug related to kappa