Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24655)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24656)
@@ -2160,7 +2160,9 @@
 			if(offset == numtimesteps-1){
 				dt = end_time - timesteps[offset];
+				_assert_(dt>0.);
 			}
 			else{
-				dt = timesteps[offset+1] - timesteps[offset]; _assert_(dt>0.);
+				dt = timesteps[offset+1] - timesteps[offset];
+				_assert_(dt>0.);
 			}
 		}
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 24655)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 24656)
@@ -5260,4 +5260,5 @@
 				int        *vertexlids = xNew<int>(numvertices);
 				element->GetInputListOnVertices(&values[0],input_enum[i]);   //this is the enum to stack
+
 				element->GetVerticesLidList(vertexlids);
 
Index: /issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp	(revision 24655)
+++ /issm/trunk-jpl/src/c/classes/Inputs2/TransientInput2.cpp	(revision 24656)
@@ -138,7 +138,8 @@
 void TransientInput2::AddTriaTimeInput(IssmDouble time,int numindices,int* indices,IssmDouble* values_in,int interp_in){/*{{{*/
 
+
 	/*Check whether this is the last time step that we have*/
 	if(this->numtimesteps){
-		if(this->timesteps[this->numtimesteps-1]>time-1.e-5 && this->timesteps[this->numtimesteps-1]<time+1.e-5){
+		if(abs(this->timesteps[this->numtimesteps-1]-time)<1.0e-5){
 			this->AddTriaTimeInput(this->numtimesteps-1,numindices,indices,values_in,interp_in);
 			return;
Index: /issm/trunk-jpl/src/c/cores/smb_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/smb_core.cpp	(revision 24655)
+++ /issm/trunk-jpl/src/c/cores/smb_core.cpp	(revision 24656)
@@ -69,4 +69,5 @@
 
 		femmodel->InitTransientInputx(&transientinput[0],numaveragedinput);
+		analysis = new SmbAnalysis();
 		while(substep<dtslices){ //loop on sub dts
 			substep+=1;
@@ -75,11 +76,10 @@
          if(VerboseSolution()) _printf0_("sub iteration " << substep << "/" << dtslices << "  time [yr]: " << setprecision(4) << subtime/yts << " (time step: " << subdt/yts << ")\n");
          if(VerboseSolution()) _printf0_("   computing smb\n");
-         analysis = new SmbAnalysis();
 			if(VerboseSolution()) _printf0_("   Calling core\n");
 			analysis->Core(femmodel);
          /*If we have a sub-timestep we store the substep inputs in a transient input here*/
          femmodel->StackTransientInputx(&substepinput[0],&transientinput[0],subtime,numaveragedinput);
-			delete analysis;
 		}
+		delete analysis;
       /*averaging the transient input*/
 		femmodel->AverageTransientInputx(&transientinput[0],&averagedinput[0],global_time-dt,subtime,numaveragedinput);
