diff --git a/control/main.cpp b/control/main.cpp
index be5b59e..413a419 100644
--- a/control/main.cpp
+++ b/control/main.cpp
@@ -30,15 +30,15 @@
         exit(-1);
     }
 
-    Manager::Mode mode;
+    Mode mode;
 
     if (args["init"] == "true")
     {
-        mode = Manager::Mode::init;
+        mode = Mode::init;
     }
     else if (args["control"] == "true")
     {
-        mode = Manager::Mode::control;
+        mode = Mode::control;
     }
     else
     {
@@ -49,7 +49,7 @@
     Manager manager(bus, mode);
 
     //Init mode will just set fans to max and delay
-    if (mode == Manager::Mode::init)
+    if (mode == Mode::init)
     {
         manager.doInit();
         return 0;
diff --git a/control/manager.cpp b/control/manager.cpp
index 6c773a7..de9074c 100644
--- a/control/manager.cpp
+++ b/control/manager.cpp
@@ -59,7 +59,7 @@
             for (auto& z : zones)
             {
                 _zones.emplace(std::get<zoneNumPos>(z),
-                               std::make_unique<Zone>(_bus, z));
+                               std::make_unique<Zone>(mode, _bus, z));
             }
 
             break;
diff --git a/control/manager.hpp b/control/manager.hpp
index 675dfb8..521b4cd 100644
--- a/control/manager.hpp
+++ b/control/manager.hpp
@@ -23,17 +23,6 @@
 {
     public:
 
-        /**
-         * The mode the manager will run in:
-         *   - init - only do the initialization steps
-         *   - control - run normal control algorithms
-         */
-        enum class Mode
-        {
-            init,
-            control
-        };
-
         Manager() = delete;
         Manager(const Manager&) = delete;
         Manager(Manager&&) = default;
diff --git a/control/zone.cpp b/control/zone.cpp
index 3a35b24..18fd627 100644
--- a/control/zone.cpp
+++ b/control/zone.cpp
@@ -23,7 +23,8 @@
 {
 
 
-Zone::Zone(sdbusplus::bus::bus& bus,
+Zone::Zone(Mode mode,
+           sdbusplus::bus::bus& bus,
            const ZoneDefinition& def) :
     _bus(bus),
     _fullSpeed(std::get<fullSpeedPos>(def)),
@@ -36,23 +37,29 @@
         _fans.emplace_back(std::make_unique<Fan>(bus, def));
     }
 
-    // Setup signal trigger for set speed events
-    for (auto& event : std::get<setSpeedEventsPos>(def))
+    // Do not enable set speed events when in init mode
+    if (mode != Mode::init)
     {
-        for (auto& prop : std::get<propChangeListPos>(event))
+        // Setup signal trigger for set speed events
+        for (auto& event : std::get<setSpeedEventsPos>(def))
         {
-            _signalEvents.emplace_back(
-                std::make_unique<SignalEvent>(this,
-                                              EventData
-                                              {
-                                                  std::get<groupPos>(event),
-                                                  std::get<handlerObjPos>(prop),
-                                                  std::get<actionPos>(event)
-                                              }));
-            _matches.emplace_back(bus,
-                                  std::get<signaturePos>(prop).c_str(),
-                                  signalHandler,
-                                  _signalEvents.back().get());
+            for (auto& prop : std::get<propChangeListPos>(event))
+            {
+                _signalEvents.emplace_back(
+                        std::make_unique<SignalEvent>(
+                                this,
+                                EventData
+                                {
+                                    std::get<groupPos>(event),
+                                    std::get<handlerObjPos>(prop),
+                                    std::get<actionPos>(event)
+                                }));
+                _matches.emplace_back(
+                        bus,
+                        std::get<signaturePos>(prop).c_str(),
+                        signalHandler,
+                        _signalEvents.back().get());
+            }
         }
     }
 }
diff --git a/control/zone.hpp b/control/zone.hpp
index d8f3fe4..1a4e173 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -13,6 +13,17 @@
 {
 
 /**
+ * The mode fan control will run in:
+ *   - init - only do the initialization steps
+ *   - control - run normal control algorithms
+ */
+enum class Mode
+{
+    init,
+    control
+};
+
+/**
  * @class Represents a fan control zone, which is a group of fans
  * that behave the same.
  */
@@ -32,10 +43,12 @@
          * Creates the appropriate fan objects based on
          * the zone definition data passed in.
          *
+         * @param[in] mode - mode of fan control
          * @param[in] bus - the dbus object
          * @param[in] def - the fan zone definition data
          */
-        Zone(sdbusplus::bus::bus& bus,
+        Zone(Mode mode,
+             sdbusplus::bus::bus& bus,
              const ZoneDefinition& def);
 
         /**
