diff --git a/src/libifa-rpf.c b/src/libifa-rpf.c
index af3425e..eb14d27 100644
--- a/src/libifa-rpf.c
+++ b/src/libifa-rpf.c
@@ -432,10 +432,12 @@ static void _grm_fix_crazy_stuff(const double *spec, const int numOutcomes, doub
 
   for (int fx=0; fx < numOutcomes; fx++) {
     if (out[fx] < 0) {
+      Rprintf("grm %d is <0\n", fx);
       set_deriv_nan(spec, out);
       return;
     }
     if (out[fx] == 0) {
+      Rprintf("grm %d is ==0\n", fx);
       double small = exp(-EXP_STABLE_DOMAIN);
       out[bigk] -= small;
       out[fx] += small;
@@ -458,6 +460,7 @@ irt_rpf_mdim_grm_prob(const double *spec,
   if (athb < -EXP_STABLE_DOMAIN) athb = -EXP_STABLE_DOMAIN;
   else if (athb > EXP_STABLE_DOMAIN) athb = EXP_STABLE_DOMAIN;
   double tmp = 1 / (1 + exp(athb));
+  Rprintf("athb %.10g tmp %.10g 1-tmp %.10g\n", athb, tmp, 1-tmp);
   out[0] = 1-tmp;
   out[1] = tmp;
 
@@ -466,6 +469,7 @@ irt_rpf_mdim_grm_prob(const double *spec,
     if (athb < -EXP_STABLE_DOMAIN) athb = -EXP_STABLE_DOMAIN;
     else if (athb > EXP_STABLE_DOMAIN) athb = EXP_STABLE_DOMAIN;
     double tmp = 1 / (1 + exp(athb));
+    Rprintf("athb %.10g tmp %.10g 1-tmp %.10g\n", athb, tmp, 1-tmp);
     out[kx-1] -= tmp;
     out[kx] = tmp;
   }
