diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0e2ee123b00592e8bf72a22bea4871287a23f308..5490547b73dd56ef97cc9982fa24402833b43a31 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -93,9 +93,9 @@ clang-tidy:
   variables:
     EMPER_WORKER_SLEEP: 'false'
 
-.emper-worker-stats:
+.emper-stats:
   variables:
-    EMPER_WORKER_STATS: 'true'
+    EMPER_STATS: 'true'
 
 .emper-userspace-rcu:
   variables:
@@ -201,7 +201,7 @@ test-worker-no-sleep:
 test-with-stats:
   extends:
     - .test
-    - .emper-worker-stats
+    - .emper-stats
 
 test-with-userspace-rcu:
   extends:
diff --git a/emper/Runtime.cpp b/emper/Runtime.cpp
index a49128b9c3fe71af90ea0e6eac8176069d2e8250..31c7b1c232545aeddd141fa6f9348554bf29d6e9 100644
--- a/emper/Runtime.cpp
+++ b/emper/Runtime.cpp
@@ -165,7 +165,10 @@ Runtime::~Runtime() {
 	// objects bound to the runtime's lifetime
 	if constexpr (emper::STATS) {
 		printLastRuntimeStats();
-		emper::io::Stats::printStats(globalIo, ioContexts);
+
+		if constexpr (emper::IO) {
+			emper::io::Stats::printStats(globalIo, ioContexts);
+		}
 	}
 
 	for (unsigned int i = 0; i < workerCount; ++i) {