diff --git a/internal/pkg/common/omci_cc.go b/internal/pkg/common/omci_cc.go
index f9f850b..8763443 100755
--- a/internal/pkg/common/omci_cc.go
+++ b/internal/pkg/common/omci_cc.go
@@ -4411,12 +4411,12 @@
 
 // SendOnuSwSectionsWindowWithRxSupervision sends onu swd sections
 func (oo *OmciCC) SendOnuSwSectionsWindowWithRxSupervision(ctx context.Context,
-	aOmciTxRequest OmciTransferStructure, aTimeout int, rxChan chan Message) {
+	aOmciTxRequest OmciTransferStructure, aTimeout int, rxChan chan Message) error {
 	if aOmciTxRequest.OnuSwWindow == nil {
 		logger.Errorw(ctx, "SendOnuSwSectionsWindowWithRxSupervision: omciTxRequest.OnuSwWindow is nil",
 			log.Fields{"device-id": oo.deviceID})
-		return
-
+		return fmt.Errorf("sendOnuSwSectionsWindowWithRxSupervision: omciTxRequest.OnuSwWindow is nil device-id: %v",
+			oo.deviceID)
 	}
 
 	tid := oo.GetOnuSwSecLastTid()
@@ -4446,7 +4446,7 @@
 	retryCounter := 0
 	if aTimeout == 0 {
 		logger.Errorw(ctx, "no timeout present for last section of window", log.Fields{"device-id": oo.deviceID})
-		return
+		return fmt.Errorf("no timeout present for last section of window device-id: %v", oo.deviceID)
 	}
 loop:
 	for retryCounter <= retries {
@@ -4478,18 +4478,33 @@
 						log.Fields{"tid": tid, "retries": retryCounter, "device-id": oo.deviceID})
 				}
 				oo.incrementTxTimesouts()
-				break loop
-			} else {
-				logger.Infow(ctx, "reqMon: timeout waiting for response - retry",
-					log.Fields{"tid": tid, "retries": retryCounter, "device-id": oo.deviceID})
-				oo.incrementTxRetries()
+				oo.mutexMonReq.Lock()
+				delete(oo.monitoredRequests, tid)
+				oo.mutexMonReq.Unlock()
+				return fmt.Errorf("reqMon: timeout waiting for response - no of max retries reached device-id: %v", oo.deviceID)
 			}
+			logger.Infow(ctx, "reqMon: timeout waiting for response - retry",
+				log.Fields{"tid": tid, "retries": retryCounter, "device-id": oo.deviceID})
+			oo.incrementTxRetries()
+		case _, ok := <-oo.pBaseDeviceHandler.GetDeviceDeleteCommChan(ctx):
+			if !ok {
+				logger.Warnw(ctx, "device deletion channel is closed", log.Fields{"device-id": oo.deviceID})
+				oo.mutexMonReq.Lock()
+				delete(oo.monitoredRequests, tid)
+				oo.mutexMonReq.Unlock()
+				return fmt.Errorf("device deletion channel is closed device-id: %v", oo.deviceID)
+			}
+			oo.mutexMonReq.Lock()
+			delete(oo.monitoredRequests, tid)
+			oo.mutexMonReq.Unlock()
+			return fmt.Errorf("received response from device deletion comm channel while waiting for a OMCI response device-id: %v", oo.deviceID)
 		}
 		retryCounter++
 	}
 	oo.mutexMonReq.Lock()
 	delete(oo.monitoredRequests, tid)
 	oo.mutexMonReq.Unlock()
+	return nil
 }
 
 func (oo *OmciCC) sendOnuSwSectionsOfWindow(ctx context.Context, omciTxRequest OmciTransferStructure) error {
diff --git a/internal/pkg/swupg/omci_onu_upgrade.go b/internal/pkg/swupg/omci_onu_upgrade.go
index 2143a10..3da4913 100755
--- a/internal/pkg/swupg/omci_onu_upgrade.go
+++ b/internal/pkg/swupg/omci_onu_upgrade.go
@@ -845,7 +845,12 @@
 			pUpgradeFsm := oFsm.PAdaptFsm
 			if pUpgradeFsm != nil {
 				_ = pUpgradeFsm.PFsm.Event(UpgradeEvWaitWindowAck) //state transition to upgradeStVerifyWindow
-				oFsm.pOmciCC.SendOnuSwSectionsWindowWithRxSupervision(ctx, omciTxReq, oFsm.pDeviceHandler.GetOmciTimeout(), oFsm.PAdaptFsm.CommChan)
+				err := oFsm.pOmciCC.SendOnuSwSectionsWindowWithRxSupervision(ctx, omciTxReq, oFsm.pDeviceHandler.GetOmciTimeout(), oFsm.PAdaptFsm.CommChan)
+				if err != nil {
+					logger.Errorw(ctx, "DlSection abort: can't send window acknowledgement request to ONU ", log.Fields{
+						"device-id": oFsm.deviceID, "section absolute": oFsm.nextDownloadSectionsAbsolute, "error": err})
+					oFsm.abortOnOmciError(ctx, false)
+				}
 				return
 			}
 			logger.Warnw(ctx, "pUpgradeFsm is nil", log.Fields{"device-id": oFsm.deviceID})
@@ -1969,7 +1974,7 @@
 				oFsm.volthaDownloadState = voltha.ImageState_DOWNLOAD_FAILED
 			}
 			//reset the image state from Downloading in this case
-			oFsm.volthaImageState = voltha.ImageState_IMAGE_UNKNOWN //something like 'IMAGE_DOWNLOAD_ABORTED' would be better (proto)
+			oFsm.volthaImageState = voltha.ImageState_IMAGE_DOWNLOADING_ABORTED
 		//in all other upgrade phases the last set download state remains valid
 		case cUpgradeActivating:
 			//reset the image state from Activating in this case
@@ -1986,7 +1991,7 @@
 		oFsm.volthaDownloadState = voltha.ImageState_DOWNLOAD_FAILED
 		oFsm.volthaDownloadReason = voltha.ImageState_CANCELLED_ON_ONU_STATE
 		//reset the image state from Downloading in this case
-		oFsm.volthaImageState = voltha.ImageState_IMAGE_UNKNOWN //something like 'IMAGE_DOWNLOAD_ABORTED' would be better (proto)
+		oFsm.volthaImageState = voltha.ImageState_IMAGE_DOWNLOADING_ABORTED
 	}
 }
 
