diff --git a/VERSION b/VERSION
index c35cbf3..927ac59 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.7-dev183
+1.2.7-dev184
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 0f067d0..ac04031 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -1810,6 +1810,14 @@
 	}
 	_ = dh.deviceReasonUpdate(ctx, drInitialMibDownloaded, !dh.isReconciling())
 
+	if !dh.getCollectorIsRunning() {
+		// Start PM collector routine
+		go dh.startCollector(ctx)
+	}
+	if !dh.getAlarmManagerIsRunning(ctx) {
+		go dh.startAlarmManager(ctx)
+	}
+
 	// Initialize classical L2 PM Interval Counters
 	if err := dh.pOnuMetricsMgr.pAdaptFsm.pFsm.Event(l2PmEventInit); err != nil {
 		// There is no way we should be landing here, but if we do then
@@ -2961,9 +2969,12 @@
 					logger.Errorw(ctx, "metrics manager fsm not initialized", log.Fields{"device-id": dh.deviceID})
 				}
 			}()
-
-			dh.pOnuMetricsMgr.stopProcessingOmciResponses <- true // Stop the OMCI GET response processing routine
-			dh.pOnuMetricsMgr.stopTicks <- true
+			if dh.pOnuMetricsMgr.getOmciProcessingStatus() {
+				dh.pOnuMetricsMgr.stopProcessingOmciResponses <- true // Stop the OMCI GET response processing routine
+			}
+			if dh.pOnuMetricsMgr.getTickGenerationStatus() {
+				dh.pOnuMetricsMgr.stopTicks <- true
+			}
 
 			return
 		case <-time.After(time.Duration(FrequencyGranularity) * time.Second): // Check every FrequencyGranularity to see if it is time for collecting metrics
diff --git a/internal/pkg/onuadaptercore/onu_metrics_manager.go b/internal/pkg/onuadaptercore/onu_metrics_manager.go
index 984f8ab..7d2e787 100644
--- a/internal/pkg/onuadaptercore/onu_metrics_manager.go
+++ b/internal/pkg/onuadaptercore/onu_metrics_manager.go
@@ -271,8 +271,10 @@
 	standaloneMetricMap map[string]*standaloneMetric
 
 	stopProcessingOmciResponses chan bool
+	omciProcessingActive        bool
 
-	stopTicks chan bool
+	stopTicks            chan bool
+	tickGenerationActive bool
 
 	nextGlobalMetricCollectionTime time.Time // valid only if pmConfig.FreqOverride is set to false.
 
@@ -916,11 +918,12 @@
 	// The processOmciMessages routine will get stopped if startCollector routine (in device_handler.go)
 	// is stopped - as a result of ONU going down.
 	mm.flushMetricCollectionChannels(ctx)
-
+	mm.updateOmciProcessingStatus(true)
 	for {
 		select {
 		case <-mm.stopProcessingOmciResponses: // stop this routine
 			logger.Infow(ctx, "Stop routine to process OMCI-GET messages for device-id", log.Fields{"device-id": mm.pDeviceHandler.deviceID})
+			mm.updateOmciProcessingStatus(false)
 			return
 		case message, ok := <-mm.pAdaptFsm.commChan:
 			if !ok {
@@ -1558,7 +1561,7 @@
 
 	select {
 	case <-time.After(time.Duration(mm.pDeviceHandler.pOpenOnuAc.omciTimeout) * time.Second):
-		logger.Errorf(ctx, "timed out waiting for sync time response from onu", log.Fields{"device-id": mm.pDeviceHandler.deviceID})
+		logger.Errorw(ctx, "timed out waiting for sync time response from onu", log.Fields{"device-id": mm.pDeviceHandler.deviceID})
 		return fmt.Errorf("timed-out-waiting-for-sync-time-response-%v", mm.pDeviceHandler.deviceID)
 	case syncTimeRes := <-mm.syncTimeResponseChan:
 		if !syncTimeRes {
@@ -2087,6 +2090,7 @@
 }
 
 func (mm *onuMetricsManager) generateTicks(ctx context.Context) {
+	mm.updateTickGenerationStatus(true)
 	for {
 		select {
 		case <-time.After(L2PmCollectionInterval * time.Second):
@@ -2097,6 +2101,7 @@
 			}()
 		case <-mm.stopTicks:
 			logger.Infow(ctx, "stopping ticks", log.Fields{"device-id": mm.pDeviceHandler.deviceID})
+			mm.updateTickGenerationStatus(false)
 			return
 		}
 	}
@@ -2596,6 +2601,30 @@
 	return value
 }
 
+func (mm *onuMetricsManager) updateOmciProcessingStatus(status bool) {
+	mm.onuMetricsManagerLock.Lock()
+	defer mm.onuMetricsManagerLock.Unlock()
+	mm.omciProcessingActive = status
+}
+
+func (mm *onuMetricsManager) updateTickGenerationStatus(status bool) {
+	mm.onuMetricsManagerLock.Lock()
+	defer mm.onuMetricsManagerLock.Unlock()
+	mm.tickGenerationActive = status
+}
+
+func (mm *onuMetricsManager) getOmciProcessingStatus() bool {
+	mm.onuMetricsManagerLock.RLock()
+	defer mm.onuMetricsManagerLock.RUnlock()
+	return mm.omciProcessingActive
+}
+
+func (mm *onuMetricsManager) getTickGenerationStatus() bool {
+	mm.onuMetricsManagerLock.RLock()
+	defer mm.onuMetricsManagerLock.RUnlock()
+	return mm.tickGenerationActive
+}
+
 func (mm *onuMetricsManager) appendIfMissingString(slice []string, n string) []string {
 	for _, ele := range slice {
 		if ele == n {
