diff --git a/src/scheme/AcousticSolver.cpp b/src/scheme/AcousticSolver.cpp
index 29f18230abad5fb5cb2b3d99044a5539aed2f3d3..fe035465c94045a611997ac6deade0941e2dd8bf 100644
--- a/src/scheme/AcousticSolver.cpp
+++ b/src/scheme/AcousticSolver.cpp
@@ -772,7 +772,7 @@ AcousticSolverHandler::AcousticSolver<Dimension>::_applyCouplingBC(const Boundar
               }
             });
 
-#endif PUGS_HAS_COSTO
+#endif   // PUGS_HAS_COSTO
         }
       },
       boundary_condition);
diff --git a/src/utils/Messenger.hpp b/src/utils/Messenger.hpp
index ce8b1735362e3a4fa3f3bfe2fed27629f0fcefef..83e6e9347cc99bbe3aaeaa3579820a4d431b9723 100644
--- a/src/utils/Messenger.hpp
+++ b/src/utils/Messenger.hpp
@@ -466,7 +466,7 @@ class Messenger
   }
 
   PUGS_INLINE
-  const MPI_Comm&
+  MPI_Comm
   globalComm() const
   {
     return MPI_COMM_WORLD;