Fixed minor bug in kappa