diff --git a/AMDiS/src/AMDiS.cc b/AMDiS/src/AMDiS.cc
index 5e97c4a56224bdc010ceab7a59b5b2ecb4b18d3c..b81d6b1cf020c81d0746f5f80b6743a0c3d1bb3b 100644
--- a/AMDiS/src/AMDiS.cc
+++ b/AMDiS/src/AMDiS.cc
@@ -115,7 +115,7 @@ namespace AMDiS {
       Parameters::init(initFileName);
     }
 
-#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
+#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP) || defined(HAVE_MPI)
     Parameters::get("parallel->log main rank", Msg::outputMainRank);
 #endif
 
diff --git a/AMDiS/src/DOFVector.hh b/AMDiS/src/DOFVector.hh
index b05af7cd9098074b3327e96387b628deac37bd08..61b1c7678340bcc300616a8ba1d1af8edb274a7c 100644
--- a/AMDiS/src/DOFVector.hh
+++ b/AMDiS/src/DOFVector.hh
@@ -143,7 +143,9 @@ namespace AMDiS {
       Parallel::MeshDistributor::globalMeshDistributor->removeInterchangeVector(this);
 #endif
     
+    #ifdef _OPENMP
     #pragma omp critical
+    #endif
     if (this->feSpace && this->feSpace->getAdmin())
       (this->feSpace->getAdmin())->removeDOFIndexed(this);
 
diff --git a/AMDiS/src/Initfile.h b/AMDiS/src/Initfile.h
index 4f2331b0502232c11cbf504cea8fdba7702febb1..260d38d3c1ad647710f646701f11ced35edcd97e 100644
--- a/AMDiS/src/Initfile.h
+++ b/AMDiS/src/Initfile.h
@@ -131,7 +131,7 @@ namespace AMDiS {
 
 
     /// convert string to string
-    inline void convert(const std::string valStr, std::string& value)
+    inline void convert(const std::string& valStr, std::string& value)
     {
       value = trim(valStr);
     }
@@ -145,7 +145,7 @@ namespace AMDiS {
 	         boost::mpl::not_< boost::is_enum<T> > >,
 	       void
 	     >::type
-    convert(const std::string valStr, T& value)
+    convert(const std::string& valStr, T& value)
     {
       using boost::lexical_cast;
       using boost::numeric_cast;
@@ -166,7 +166,7 @@ namespace AMDiS {
 	     < boost::is_enum<T>,
 	       void
 	     >::type
-    convert(const std::string valStr, T& value)
+    convert(const std::string& valStr, T& value)
     {
       int swap = 0;
       //      try {
@@ -179,7 +179,7 @@ namespace AMDiS {
 
 
     /// convert special enums
-    inline void convert(const std::string valStr, Norm& value)
+    inline void convert(const std::string& valStr, Norm& value)
     {
       std::string swapStr = boost::to_upper_copy(valStr);
 
@@ -200,7 +200,7 @@ namespace AMDiS {
     /// convert value of arbitrary type to string using stringstream and
     /// operator<< for type
     template<typename T>
-    inline void convert(const T value, std::string& valStr)
+    inline void convert(const T& value, std::string& valStr)
     {
       std::stringstream ss;
       ss.precision(6);
@@ -223,20 +223,20 @@ namespace AMDiS {
 
     // forward declarations
     template< typename T >
-    inline void convert(const std::string valStr, WorldVector<T>& c);
+    inline void convert(const std::string& valStr, WorldVector<T>& c);
 
     template<typename T>
-    inline void convert(const std::string valStr, std::list<T>& value);
+    inline void convert(const std::string& valStr, std::list<T>& value);
 
     template<typename T>
-    inline void convert(const std::string valStr, std::vector<T>& value);
+    inline void convert(const std::string& valStr, std::vector<T>& value);
 
     /** parse an container from tag tag. The Container must have the properties:
     * 	- type value_type
     * 	- member function push_back
     */
     template< typename Container >
-    inline void getContainer(const std::string val_, Container& c)
+    inline void getContainer(const std::string& val_, Container& c)
     {
       // accepted brackets and delimiters for vector input
       std::string begBrackets= "{[(";
@@ -286,7 +286,7 @@ namespace AMDiS {
 
     /// convert string to WorldVector
     template< typename T >
-    inline void convert(const std::string valStr, WorldVector<T>& c)
+    inline void convert(const std::string& valStr, WorldVector<T>& c)
     {
       std::vector<T> temp_vec;
       getContainer(valStr, temp_vec);
@@ -299,7 +299,7 @@ namespace AMDiS {
 
     /// convert string to std::list using begBrackets, endBrackets and delims
     template<typename T>
-    inline void convert(const std::string valStr, std::list<T>& value)
+    inline void convert(const std::string& valStr, std::list<T>& value)
     {
       getContainer(valStr, value);
     }
@@ -307,7 +307,7 @@ namespace AMDiS {
 
     /// convert string to std::vector using begBrackets, endBrackets and delims
     template<typename T>
-    inline void convert(const std::string valStr, std::vector<T>& value)
+    inline void convert(const std::string& valStr, std::vector<T>& value)
     {
       getContainer(valStr, value);
     }
@@ -525,7 +525,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
 
     /// update map tag->value_old to tag->value in singleton
     template<typename T>
-    static void set(const std::string tag, T& value, int debugInfo=  -1)
+    static void set(const std::string tag, T const& value, int debugInfo=  -1)
     {
 //       boost::unique_lock<boost::shared_mutex> lock(singlett().mutex_);
       
@@ -545,7 +545,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
 
     /// add map tag->value to data in singleton
     template< typename T >
-    static void add(const std::string tag, T& value, int debugInfo = -1)
+    static void add(const std::string tag, T const& value, int debugInfo = -1)
     {
       set(tag, value, debugInfo);
     }
diff --git a/AMDiS/src/io/ElementFileWriter.cc b/AMDiS/src/io/ElementFileWriter.cc
index 13ba796bc3fa88d9a93ac0858817c8b0b1f44c93..b0e99daff10dd24ed7e7acb93c2a5978f6033752 100644
--- a/AMDiS/src/io/ElementFileWriter.cc
+++ b/AMDiS/src/io/ElementFileWriter.cc
@@ -192,7 +192,7 @@ namespace AMDiS { namespace io {
       //boost::iostreams seems not to truncate the file
       ofstream swapfile(filename.c_str(), ios::out | ios::trunc);
       TEST_EXIT(swapfile.is_open())
-	("Cannot open file %s for writing!\n", name.c_str());
+	("Cannot open file %s for writing!\n", filename.c_str());
       swapfile.close();
     }
     file.push(boost::iostreams::file_descriptor_sink(filename, ios::trunc));
@@ -311,7 +311,7 @@ namespace AMDiS { namespace io {
       //boost::iostreams seems not to truncate the file
       ofstream swapfile(filename.c_str(), ios::out | ios::trunc);
       TEST_EXIT(swapfile.is_open())
-	("Cannot open file %s for writing!\n", name.c_str());
+	("Cannot open file %s for writing!\n", filename.c_str());
       swapfile.close();
     }
     file.push(boost::iostreams::file_descriptor_sink(filename, ios::trunc));