diff --git a/emper/ContextManager.cpp b/emper/ContextManager.cpp
index 6eec4d55cf0ca31d519b9e09a1f1e14858de4295..6cf7d76cc88d186f8c5f36ec8290292998e5ade2 100644
--- a/emper/ContextManager.cpp
+++ b/emper/ContextManager.cpp
@@ -9,6 +9,7 @@
 #include "Debug.hpp"			 // for LOGD
 #include "Dispatcher.hpp"	 // for Dispatcher
 #include "Runtime.hpp"		 // for Runtime
+#include "emper-config.h"	 // // IWYU pragma: keep
 
 class Fiber;
 
diff --git a/emper/Fiber.cpp b/emper/Fiber.cpp
index 0c8eb418f04909eb75933be1ea397260eda74cbe..3753d920bb761df61645d35dfbd99eaa8d505a48 100644
--- a/emper/Fiber.cpp
+++ b/emper/Fiber.cpp
@@ -4,7 +4,9 @@
 
 #include <iostream>	 // for operator<<, basic_ostream, ostream, basic_ostrea...
 
-#ifndef NDEBUG
+#include "emper-config.h"	 // IWYU pragma: keep
+
+#ifndef EMPER_LOG_OFF
 #include <typeinfo>	 // for type_info
 #endif
 
diff --git a/tests/SimpleActorTest.cpp b/tests/SimpleActorTest.cpp
index 7f428af43e13726b815e1c5b45421aadba0adde1..7f81b724f00f4814132375a4b499166fb78cf76d 100644
--- a/tests/SimpleActorTest.cpp
+++ b/tests/SimpleActorTest.cpp
@@ -9,12 +9,16 @@
 #include "Actor.hpp"										 // for Actor
 #include "CountingPrivateSemaphore.hpp"	 // for CPS
 #include "Debug.hpp"										 // for WDBG
-#include "Dispatcher.hpp"								 // for Dispatcher
 #include "Fiber.hpp"										 // for Fiber
 #include "Runtime.hpp"									 // for Runtime
 #include "emper-common.h"								 // for UNUSED_ARG
+#include "emper-config.h"								 // // IWYU pragma: keep
 #include "emper.hpp"										 // for spawn
 
+#ifndef EMPER_LOG_OFF
+#include "Dispatcher.hpp"	 // for Dispatcher
+#endif
+
 class SumActor : public Actor<uint64_t> {
  private:
 	uint64_t sum = 0;