--- a/R/jags.R
+++ b/R/jags.R
@@ -100,6 +100,10 @@
                           }
                       }
                       return(model.state)
+                  },
+                  "nchain" = function()
+                  {
+                      .Call("get_nchain", p, PACKAGE="rjags")
                   },
                   "iter" = function()
                   {
@@ -136,6 +140,9 @@
                               .Call("set_parameters", p, statei, i, PACKAGE="rjags")
                           }
                           .Call("initialize", p, PACKAGE="rjags")
+                          #Redo adaptation
+                          .Call("update", p, n.adapt, TRUE, PACKAGE="rjags")
+                          model.state <<- .Call("get_state", p, PACKAGE="rjags")
                       }
                       invisible(NULL)
                   })