Spatial modeling of binary response outcome

I am modelling dichotomous response data to explain geographical variation in my data. I have attached my method and below is a brief description of my model;

Yik follows a Bernoulli distribution for a child k located in state i = 1, ...,37 with response either 0 or 1. We added structured and unstructured random effects to account for unobserved influential factors that vary across the state. I have run my code;

Formula<- yik~x1+...+xn+f(NAME_1a,model="besag",graph="Map.adj")+
+   f(NAME_1b,model="iid")
> Analysis<-inla(Formula
+                ,family="binomial"
+                ,data=dat
+                ,control.compute=list(dic=TRUE, cpo=TRUE)),

but got this message;

Error in inla(Formula, family = "binomial", data = dat, control.compute = list(dic = TRUE,  : 
In f(NAME_1a): 'covariate' must match 'values',  and both must either be 'numeric', or 'factor'/'character'.

In order to rectify the error, I run the following code also,

m = get("inla.models", INLA:::inla.get.inlaEnv())
m$latent$rw2$min.diff <- NULL
assign("inla.models", m, INLA:::inla.get.inlaEnv())

But this particular one, m$latent$rw2$min.diff <- NULL brought out this error;

"Error in `*tmp*`$latent :`  object of type 'closure' is not subsettable"