diff --git a/AMDiS/src/AdaptInstationary.cc b/AMDiS/src/AdaptInstationary.cc
index 0781d4e33d3a1b350a33cbe5949cd36039b9f851..eef6a2cbe46bd4796cffdce266023d6c1fa88084 100644
--- a/AMDiS/src/AdaptInstationary.cc
+++ b/AMDiS/src/AdaptInstationary.cc
@@ -205,7 +205,7 @@ namespace AMDiS {
 
       problemTime_->initTimestep(adaptInfo_);
 
-#ifdef _OPENMP
+      /*#ifdef _OPENMP
 #pragma omp parallel sections
       {
 #pragma omp section
@@ -215,9 +215,10 @@ namespace AMDiS {
 	oneTimestep();
       }
 #else
-      problemTime_->startDelayedTimestepCalculation();
+      */
+      //      problemTime_->startDelayedTimestepCalculation();
       oneTimestep();
-#endif
+      //#endif
 
       problemTime_->closeTimestep(adaptInfo_);
 
diff --git a/AMDiS/src/DataCollector.cc b/AMDiS/src/DataCollector.cc
index 1d0372488347c55531270c64eb226cc3d3b5e972..f2b8ef39acb670be76697cd2158c4334515aadcf 100644
--- a/AMDiS/src/DataCollector.cc
+++ b/AMDiS/src/DataCollector.cc
@@ -58,15 +58,21 @@ namespace AMDiS {
 
   void DataCollector::fillAllData()
   {
+    ::std::cout << "START1" << ::std::endl;
     if (!elementDataCollected_) {
       startCollectingElementData();
     }
+
+    ::std::cout << "START2" << ::std::endl;
     if (!periodicDataCollected_) {
       startCollectingPeriodicData();
     }
+
+    ::std::cout << "START3" << ::std::endl;
     if (!valueDataCollected_) {
       startCollectingValueData();
     }
+    ::std::cout << "START4" << ::std::endl;
   }
 
   int DataCollector::startCollectingElementData()
@@ -123,13 +129,12 @@ namespace AMDiS {
     ElInfo *elInfo = stack.traverseFirst(mesh_, 
 					 level_, 
 					 traverseFlag_ | Mesh::FILL_COORDS);
-    while(elInfo) {
+    while (elInfo) {
       if (!writeElem_ || writeElem_(elInfo))
-	addValueData(elInfo);
+      	addValueData(elInfo);
       elInfo = stack.traverseNext(elInfo);
     }
-
-
+   
     // Remove all interpolation marks and, instead, set to each
     // interpolation point its continous index starting from 0.
     int i = 0;
@@ -146,7 +151,7 @@ namespace AMDiS {
 	addInterpData(elInfo);
       elInfo = stack.traverseNext(elInfo);
     }
-
+    
     valueDataCollected_ = true;
 
     return(0);
diff --git a/AMDiS/src/FileWriter.cc b/AMDiS/src/FileWriter.cc
index 2831fa89770fa4e56784bc0febcd2e1dcec01482..5804e188ae752f79af4fd5b71e559cd9a423324c 100644
--- a/AMDiS/src/FileWriter.cc
+++ b/AMDiS/src/FileWriter.cc
@@ -197,14 +197,19 @@ namespace AMDiS {
 
 
     if (delayWriting_) {
+      ::std::cout << "REIN!" << ::std::endl; ::std::cout.flush();
+
       if (writeTecPlotFormat || writeAMDiSFormat || writePeriodicFormat) {
 	ERROR_EXIT("Delay writing only supported for ParaView file format!\n");
       }
+      ::std::cout << "DC=" << dataCollectors_.size()<< ::std::endl;
 
       for (int i = 0; i < static_cast<int>(dataCollectors_.size()); i++) {
 	dataCollectors_[i]->fillAllData();
       }
 
+      ::std::cout << "BIS HIERHIN!" << ::std::endl; ::std::cout.flush();
+
       writingIsDelayed_ = true;
       delayedFilename_ = fn;
       return;
diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc
index 055b6aa670c1b317c7a11582ad3e215e42258e31..eb7ae9056b35f1a288cbd375f838bd99b3565c8f 100644
--- a/AMDiS/src/ProblemVec.cc
+++ b/AMDiS/src/ProblemVec.cc
@@ -526,7 +526,7 @@ namespace AMDiS {
 
     clock_t first = clock();
     int iter = solver_->solve(matVec_, solution_, rhs_, leftPrecon_, rightPrecon_);   
-
+    
 #ifdef _OPENMP
     INFO(info_, 8)("solution of discrete system needed %.5f seconds system time / %.5f seconds wallclock time\n",
 		   TIME_USED(first, clock()),
diff --git a/AMDiS/src/ResidualEstimator.cc b/AMDiS/src/ResidualEstimator.cc
index 202762640d663a7e1cb92a976bdc32e080145f06..aeb70274b69e3326bacf7831a632a7065e6eb5fe 100644
--- a/AMDiS/src/ResidualEstimator.cc
+++ b/AMDiS/src/ResidualEstimator.cc
@@ -77,6 +77,9 @@ namespace AMDiS {
 
     riq = GET_MEMORY(double, numPoints);
 
+    grdUh_qp = NULL;
+    D2uhqp = NULL;
+
     TraverseStack stack;
     ElInfo *elInfo = NULL;
 
@@ -117,12 +120,15 @@ namespace AMDiS {
     }
 
     FREE_MEMORY(uhEl, double*, numSystems);
-    if (timestep)
-      FREE_MEMORY(uhOldEl, double*, numSystems);
 
     if (timestep) {
+      FREE_MEMORY(uhOldEl, double*, numSystems);
       FREE_MEMORY(uhQP, double, numPoints);
       FREE_MEMORY(uhOldQP, double, numPoints);
+    } else {
+      if (uhQP != NULL) {
+	FREE_MEMORY(uhQP, double, numPoints);
+      }
     }
 
     if (output) {
@@ -135,6 +141,13 @@ namespace AMDiS {
     FREE_MEMORY(riq, double, numPoints);
     FREE_MEMORY(basFcts, const BasisFunction*, numSystems);
     FREE_MEMORY(quadFast, FastQuadrature*, numSystems);
+
+    if (grdUh_qp != NULL) {
+      FREE_MEMORY(grdUh_qp, WorldVector<double>, numPoints);
+    }
+    if (D2uhqp != NULL) {
+      FREE_MEMORY(D2uhqp, WorldMatrix<double>, numPoints);
+    }
   }
 
   void ResidualEstimator::estimateElement(ElInfo *elInfo)
@@ -150,9 +163,6 @@ namespace AMDiS {
 
     ::std::vector<Operator*>::iterator it;
 
-    WorldVector<double> *grdUh_qp = NULL;
-    WorldMatrix<double> *D2uhqp = NULL; 
-
     el = elInfo->getElement();
 
     double det = elInfo->getDet();
@@ -212,20 +222,17 @@ namespace AMDiS {
 	for (it = const_cast<DOFMatrix*>(matrix[system])->getOperatorsBegin(); 
 	     it != const_cast<DOFMatrix*>(matrix[system])->getOperatorsEnd(); 
 	     ++it) {
-	  if ((*it)->zeroOrderTerms() && !uhQP) {
+	  if ((uhQP == NULL) && (*it)->zeroOrderTerms()) {
 	    uhQP = GET_MEMORY(double, numPoints);
 	    uh[system]->getVecAtQPs(elInfo, NULL, quadFast[system], uhQP);
 	  }
-	  if ((*it)->firstOrderTermsGrdPsi() || (*it)->firstOrderTermsGrdPhi() 
-	      && !grdUh_qp) {
+	  if ((grdUh_qp == NULL) && ((*it)->firstOrderTermsGrdPsi() || (*it)->firstOrderTermsGrdPhi())) {
 	    grdUh_qp = new WorldVector<double>[numPoints];
 	    uh[system]->getGrdAtQPs(elInfo, NULL, quadFast[system], grdUh_qp);
 	  }
-	  if ((*it)->secondOrderTerms() && !D2uhqp) { 
-	    if (degree > 2) {
-	      D2uhqp = new WorldMatrix<double>[numPoints];
-	      uh[system]->getD2AtQPs(elInfo, NULL, quadFast[system], D2uhqp);
-	    }
+	  if ((D2uhqp == NULL) && (degree > 2) && (*it)->secondOrderTerms()) { 
+	    D2uhqp = new WorldMatrix<double>[numPoints];
+	    uh[system]->getD2AtQPs(elInfo, NULL, quadFast[system], D2uhqp);	    
 	  }
 	}
 	
@@ -240,7 +247,7 @@ namespace AMDiS {
 	  matrix[system], 
 	  fh[system],
 	  quad,
-	  riq);			
+	  riq);
       }     
     }
 
diff --git a/AMDiS/src/ResidualEstimator.h b/AMDiS/src/ResidualEstimator.h
index d07db3880a593b96634719a514efa50fa75c121a..ccf394b46d0ece6a881c808e8768e25f06d8e6c8 100644
--- a/AMDiS/src/ResidualEstimator.h
+++ b/AMDiS/src/ResidualEstimator.h
@@ -148,6 +148,10 @@ namespace AMDiS {
     double *uhOldQP;
 
     double *riq;
+
+    WorldVector<double> *grdUh_qp;
+
+    WorldMatrix<double> *D2uhqp; 
   };
 }