diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml
index 12e0ce30f..d0dd05d96 100644
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml
+++ b/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml
@@ -65,7 +65,7 @@ SPICEdev $(module)info = {
$(module)mParam, /* DEVmodParam */
$(module)load, /* DEVload */
$(module)setup, /* DEVsetup */
- NULL, /* DEVunsetup */
+ $(module)unsetup, /* DEVunsetup */
$(module)setup, /* DEVpzSetup */
$(module)temp, /* DEVtemperature */
$(module)trunc, /* DEVtrunc */
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml
index b05d4a48e..1dca4ada5 100644
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml
+++ b/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml
@@ -166,6 +166,32 @@ int $(module)setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *
return(OK);
}
+
+int
+$(module)unsetup(GENmodel *inModel, CKTcircuit *ckt)
+{
+ $(module)model *model = ($(module)model*)inModel;
+ $(module)instance *here;
+
+ /* loop through all the $(module) device models */
+ for ( ;model != NULL ;model = model->$(module)nextModel )
+ {
+ for ( here = model->$(module)instances ;here != NULL ; here = here->$(module)nextInstance )
+ {
+
+
+
+
+ if (here->%sNode > 0) {
+ CKTdltNNum(ckt, here->%sNode);
+ here->%sNode = -1;
+ }
+
+ }
+ }
+ return OK;
+}
+