Index: /issm/trunk-jpl/src/c/toolkits/issm/IssmVec.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/issm/IssmVec.h	(revision 25389)
+++ /issm/trunk-jpl/src/c/toolkits/issm/IssmVec.h	(revision 25390)
@@ -158,4 +158,5 @@
 		IssmVec<doubletype>* Duplicate(void){/*{{{*/
 
+			_assert_(this);
 			IssmVec<doubletype>* issmvector=NULL;
 
Index: /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp	(revision 25389)
+++ /issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp	(revision 25390)
@@ -36,5 +36,5 @@
 
 	/*Output: */
-	Vec        uf               = NULL;
+	Vec        uf = NULL;
 
 	/*Intermediary: */
@@ -83,5 +83,6 @@
 	PetscOptionsGetString(NULL,PETSC_NULL,"-ksp_type",ksp_type,49,&flg);
 	#endif
-	if (strcmp(ksp_type,"preonly")==0)uf0=NULL;
+	if(flg!=PETSC_TRUE) _error_("could not find option -ksp_type, maybe you are not using the right toolkit?");
+	if (strcmp(ksp_type,"preonly")==0) uf0=NULL;
 
 	/*If initial guess for the solution exists, use it to create uf, otherwise, 
