diff --git a/emper/Debug.hpp b/emper/Debug.hpp
index 3b207771e5f20663b0b03586b40253a601b1a33a..7b7a4faeb0030095c59fcb5c3bfd5481b78b8155 100644
--- a/emper/Debug.hpp
+++ b/emper/Debug.hpp
@@ -18,10 +18,10 @@
 // The lamda should be fairly cheap/free because it will be inlined.
 // The use of a lambda here is the ISO C++ equivalent to GCC statement expressions.
 // NOLINTNEXTLINE(bugprone-macro-parentheses)
-#define EMPER_BUILD_STR(x) [&]() -> std::string {std::stringstream sst; sst << x; return sst.str(); }
+#define EMPER_BUILD_STR(x) [&]() -> std::string {std::stringstream sst; sst << x; return sst.str(); }()
 
 // NOLINTNEXTLINE(bugprone-macro-parentheses)
-#define LOG(level, x, log_func) do { if constexpr (level <= EMPER_LOG_LEVEL) { log_func(EMPER_BUILD_STR(x)()); } } while (false)
+#define LOG(level, x, log_func) do { if constexpr (level <= EMPER_LOG_LEVEL) { log_func(EMPER_BUILD_STR(x)); } } while (false)
 
 // NOLINTNEXTLINE(bugprone-macro-parentheses)
 #define DBG(x) LOG(Debug, x, emper_log_no_prefix);