diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp
index 44bfefed1daaa57a8452c2d4227c233da02861ee..a5664ef7262dc4182117c098b6d0d1e01378c607 100644
--- a/src/cluster/cluster.cpp
+++ b/src/cluster/cluster.cpp
@@ -223,7 +223,7 @@ void cluster(const string& config_file, const string& data_file, const string& o
 	  delete time_logger;
 	  delete sconf;
 	  delete gconf;
-	  return jer;
+	  return;
 	}
 
 	// here go the calls that send data to be duplicated on other MPI processes from process 0 to others, using MPI broadcasts, but only if MPI is actually used
@@ -639,7 +639,7 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
   logger->log(message);
   if (jer != 0) {
     message = "ERROR: matrix inversion ended with error code " + to_string(jer) + ".\n";
-    logger.err(message);
+    logger->err(message);
     return jer;
     // break; // jxi488 loop: goes to memory clean
   }