diff --git a/src/shared/ActiveObject.h b/src/shared/ActiveObject.h
index 2d0c2ea82f89f123a032f3b8c2131c77f35f3e1c..acfc07e34984e84a9c9d97d66eb87b60854d1490 100644
--- a/src/shared/ActiveObject.h
+++ b/src/shared/ActiveObject.h
@@ -25,6 +25,8 @@
 #include <diagnostic/SkywardStack.h>
 #include <miosix.h>
 
+#include <atomic>
+
 namespace Boardcore
 {
 
@@ -90,8 +92,8 @@ protected:
 
     miosix::Thread* thread = nullptr;  ///< Gives access to the thread object
 
-    bool stopFlag = false;
-    bool running  = false;
+    std::atomic<bool> stopFlag;
+    std::atomic<bool> running;
 
 private:
     /**