diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc
index bdbea9e7d477f9d30b5e4395f6e1f518aeb0b25c..6e42b932a3a677c3c67d879e2fa659ed7beb6ea9 100644
--- a/AMDiS/src/ProblemVec.cc
+++ b/AMDiS/src/ProblemVec.cc
@@ -642,12 +642,9 @@ namespace AMDiS {
     if (useGetBound)
       assembleFlag |= Mesh::FILL_BOUND;
 
+#if 0
     for (int i = 0; i < nComponents; i++) {
-      MSG("%d DOFs for %s\n", 
-	  componentSpaces[i]->getAdmin()->getUsedSize(), 
-	  componentSpaces[i]->getName().c_str());
 
-      rhs->getDOFVector(i)->set(0.0);
       for (int j = 0; j < nComponents; j++) {
 	if ((*systemMatrix)[i][j]) {
 	  DOFMatrix*                   dof_matrix= (*systemMatrix)[i][j];
@@ -663,6 +660,7 @@ namespace AMDiS {
 	}
       }
     }
+#endif
 
     traverseInfo.updateStatus();
 
@@ -670,6 +668,12 @@ namespace AMDiS {
     int nnz = 0;
 
     for (int i = 0; i < nComponents; i++) {
+      MSG("%d DOFs for %s\n", 
+	  componentSpaces[i]->getAdmin()->getUsedSize(), 
+	  componentSpaces[i]->getName().c_str());
+
+      rhs->getDOFVector(i)->set(0.0);
+
       for (int j = 0; j < nComponents; j++) {
 
 	// Only if this variable is true, the current matrix will be assembled.	
@@ -678,10 +682,20 @@ namespace AMDiS {
 	// will be set to false).
 	DOFMatrix *matrix = (*systemMatrix)[i][j];
 
+	if (matrix) 
+	  matrix->calculateNnz();
+	
 	// If the matrix was assembled before and it is marked to be assembled
 	// only once, it will not be assembled.
-	if (assembleMatrixOnlyOnce[i][j] && assembledMatrix[i][j])
+	if (assembleMatrixOnlyOnce[i][j] && assembledMatrix[i][j]) {
 	  assembleMatrix = false;
+	} else if (matrix) {
+	  matrix->getBaseMatrix().
+	    change_dim(componentSpaces[i]->getAdmin()->getUsedSize(), 
+		       componentSpaces[j]->getAdmin()->getUsedSize());
+
+	  set_to_zero(matrix->getBaseMatrix());
+	}
 
 	// If there is no DOFMatrix, e.g., if it is completly 0, do not assemble.
 	if (!matrix || !assembleMatrix)
@@ -690,8 +704,12 @@ namespace AMDiS {
 	// If the matrix should not be assembled, the rhs vector has to be considered.
 	// This will be only done, if i == j. So, if both is not true, we can jump
 	// to the next matrix.
-	if (!assembleMatrix && i != j)
+	if (!assembleMatrix && i != j) {
+	  if (matrix)
+	    nnz += matrix->getBaseMatrix().nnz();
+
 	  continue;
+	}
 
 	if (assembleMatrix && matrix->getBoundaryManager())
 	  matrix->getBoundaryManager()->initMatrix(matrix);