Index: /issm/trunk/src/c/io/FetchData.cpp
===================================================================
--- /issm/trunk/src/c/io/FetchData.cpp	(revision 4529)
+++ /issm/trunk/src/c/io/FetchData.cpp	(revision 4530)
@@ -236,10 +236,10 @@
 	bool boolean;
 
-	if (!mxIsDouble(dataref)){
-		ISSMERROR("input data_type is not a scalar!");
-	}
-	else{
+	if (mxIsClass(dataref,"logical") || mxIsDouble(dataref)){
 		/*Recover the double: */
 		boolean=(bool)mxGetScalar(dataref);
+	}
+	else{
+		ISSMERROR("input data_type is not a bool!");
 	}
 
