diff --git a/install_MPI.sh b/install_MPI.sh
index 8495a1e062b3969adf59b414429dfa3e69cbf1d9..5cd73f435735c016dc5350aea73144424c133d38 100644
--- a/install_MPI.sh
+++ b/install_MPI.sh
@@ -1,9 +1,9 @@
 #!/bin/bash 
 
 mkdir ${HOME}/MPI
-wget http://www.open-mpi.de/software/ompi/v1.8/downloads/openmpi-1.8.1.tar.bz2
-tar -xvf openmpi-1.8.1.tar.bz2
-cd openmpi-1.8.1
+wget http://www.open-mpi.de/software/ompi/v1.8/downloads/openmpi-1.8.7.tar.bz2
+tar -xvf openmpi-1.8.7.tar.bz2
+cd openmpi-1.8.7
 sh ./configure --prefix=${HOME}/MPI --enable-opal-multi-threads --enable-mpi-f90
 make
 make install
diff --git a/src/memory/CudaMemory.cu b/src/memory/CudaMemory.cu
index c259ee80d778e2af97193e065aa81595e5f2bcb3..dede9872bc7059da0e060c8735152008594f3c03 100644
--- a/src/memory/CudaMemory.cu
+++ b/src/memory/CudaMemory.cu
@@ -41,7 +41,7 @@ void CudaMemory::destroy()
 	{
 		//! we invalidate hm
 		CUDA_SAFE_CALL(cudaFreeHost(hm));
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 		//! remove hm
 		check_delete(hm);
 #endif
@@ -60,7 +60,7 @@ void CudaMemory::allocate_host(size_t sz)
 	if (hm == NULL)
 	{
 		CUDA_SAFE_CALL(cudaHostAlloc(&hm,sz,cudaHostAllocMapped))
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 		//! add hm to the list of allocated memory
 		check_new(hm,sz);
 #endif
diff --git a/src/memory/HeapMemory.cpp b/src/memory/HeapMemory.cpp
index 589a6b770f1a2517bc1ca0e40c44897c46a47770..f070703b9845d6a3b534cd4e003ff4ed6cc20a61 100644
--- a/src/memory/HeapMemory.cpp
+++ b/src/memory/HeapMemory.cpp
@@ -12,7 +12,7 @@
 #include <cstdint>
 
 // If debugging mode include memory leak check
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 #include "Memleak_check.hpp"
 #endif
 
@@ -29,7 +29,7 @@ bool HeapMemory::allocate(size_t sz)
 		dmOrig = new byte[sz+alignement];
 	dm = dmOrig;
 
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 	check_new(dmOrig,sz+alignement);
 #endif
 
@@ -61,7 +61,7 @@ void HeapMemory::destroy()
 	if (dmOrig != NULL)
 		delete [] dmOrig;
 
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 	check_delete(dmOrig);
 #endif
 }
@@ -168,6 +168,9 @@ bool HeapMemory::resize(size_t sz)
 	byte * tdm;
 	byte * tdmOrig;
 	tdmOrig = new byte[sz+alignement];
+#ifdef SE_CLASS2
+	check_new(tdmOrig,sz+alignement);
+#endif
 	tdm = tdmOrig;
 
 	//! size plus alignment
diff --git a/src/memory/PtrMemory.cpp b/src/memory/PtrMemory.cpp
index 3c199618d843bb4e830dc098a0343b0da229a483..1ea17d8a34944074810db1ef6cdfd2438ee8fc9f 100644
--- a/src/memory/PtrMemory.cpp
+++ b/src/memory/PtrMemory.cpp
@@ -15,7 +15,7 @@
 #include <cstdint>
 
 // If debugging mode include memory leak check
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 #include "Memleak_check.hpp"
 #endif
 
diff --git a/src/memory/PtrMemory.hpp b/src/memory/PtrMemory.hpp
index 56d87d7cbaea08ea998e2a0903aae231b14dcb66..a725d58f5cf9264fc18c59eae6ddb7e6e0d024d2 100644
--- a/src/memory/PtrMemory.hpp
+++ b/src/memory/PtrMemory.hpp
@@ -35,7 +35,7 @@
 #include <cstdint>
 #include <iostream>
 
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 #include "Memleak_check.hpp"
 #endif
 
@@ -104,7 +104,7 @@ public:
 	// Default constructor
 	PtrMemory():spm(0),dm(NULL),sz(0),ref_cnt(0)
 	{
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 		if (process_to_print == process_v_cl)
 			std::cout << "Creating PtrMemory: " << this << "\n";
 #endif
@@ -113,7 +113,7 @@ public:
 	//! Constructor, we choose a default alignment of 32 for avx
 	PtrMemory(void * ptr, size_t sz):spm(sz),dm(ptr),sz(0),ref_cnt(0)
 	{
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 		if (process_to_print == process_v_cl)
 			std::cout << "Creating PtrMemory: " << this << "\n";
 #endif
@@ -121,7 +121,7 @@ public:
 
 	~PtrMemory()
 	{
-#ifdef MEMLEAK_CHECK
+#ifdef SE_CLASS2
 		if (process_to_print == process_v_cl)
 			std::cout << "Delete PtrMemory: " << this << "\n";
 #endif