Index: /issm/trunk/src/c/objects/DofIndexing.cpp
===================================================================
--- /issm/trunk/src/c/objects/DofIndexing.cpp	(revision 3467)
+++ /issm/trunk/src/c/objects/DofIndexing.cpp	(revision 3468)
@@ -125,10 +125,11 @@
 
 	char* marshalled_dataset=NULL;
+	int   enum_type;
 
 	/*recover marshalled_dataset: */
 	marshalled_dataset=*pmarshalled_dataset;
 
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
+	/*get enum type of object since DofIndexing is not directly called by DataSet: */
+	memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
 
 	memcpy(&numberofdofs,marshalled_dataset,sizeof(numberofdofs));marshalled_dataset+=sizeof(numberofdofs);
Index: /issm/trunk/src/c/objects/Hook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Hook.cpp	(revision 3467)
+++ /issm/trunk/src/c/objects/Hook.cpp	(revision 3468)
@@ -159,4 +159,5 @@
 	
 	/*allocate: */
+	if (num<=0) ISSMERROR("cannot demarshall Hook as num<=0");
 	this->ids=(int*)xmalloc(num*sizeof(int));
 	this->offsets=(int*)xmalloc(num*sizeof(int));
Index: /issm/trunk/src/c/objects/NodeProperties.cpp
===================================================================
--- /issm/trunk/src/c/objects/NodeProperties.cpp	(revision 3467)
+++ /issm/trunk/src/c/objects/NodeProperties.cpp	(revision 3468)
@@ -110,10 +110,11 @@
 	char* marshalled_dataset=NULL;
 	int   i;
+	int   enum_type;
 
 	/*recover marshalled_dataset: */
 	marshalled_dataset=*pmarshalled_dataset;
 
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
+	/*get enum type of object since NodeProperties is not directly called by DataSet: */
+	memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
 
 	memcpy(&onbed,marshalled_dataset,sizeof(onbed));marshalled_dataset+=sizeof(onbed);
Index: /issm/trunk/src/m/classes/public/marshall.m
===================================================================
--- /issm/trunk/src/m/classes/public/marshall.m	(revision 3467)
+++ /issm/trunk/src/m/classes/public/marshall.m	(revision 3468)
@@ -172,8 +172,6 @@
 WriteData(fid,md.name,'String','name');
 
-%Get penalties to connect collapsed and non-collapsed 3d meshes: 
-if strcmpi(md.type,'3d'),
-	WriteData(fid,md.penalties,'Mat','penalties');
-end
+%Get penalties
+WriteData(fid,md.penalties,'Mat','penalties');
 
 %input and output file names
