diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py
index 9a9bd27dfa8d651e39ff428ba7cfd61f91624210..3a376c0147ad61ca1db1041975f4d6afdd79460e 100644
--- a/src/service/service/ServiceServiceServicerImpl.py
+++ b/src/service/service/ServiceServiceServicerImpl.py
@@ -367,7 +367,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
             context_client.RemoveService(request)
             return Empty()
 
-        if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY:
+        if is_deployed_optical() and service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY:
             params = {
                 "src"     : None,
                 "dst"     : None,
diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py
index cb1e91cc2172162858f3cf0246fa4ce46497b82e..8528f8365c1e3a461c288fdf6efe14475921051c 100644
--- a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py
+++ b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py
@@ -56,12 +56,15 @@ class Task_ConnectionDeconfigure(_Task):
         endpointids_to_delete = endpointids_to_raw(connection.path_hops_endpoint_ids)
 
         errors = list()
-        for _, (service_handler, connection_devices) in service_handlers.items():
-            _endpointids_to_delete = [
-                (device_uuid, endpoint_uuid, topology_uuid)
-                for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_delete
-                if device_uuid in connection_devices
-            ]
+        for device_type, (service_handler, connection_devices) in service_handlers.items():
+            if device_type == DeviceTypeEnum.TERAFLOWSDN_CONTROLLER:
+                _endpointids_to_delete = endpointids_to_delete
+            else:
+                _endpointids_to_delete = [
+                    (device_uuid, endpoint_uuid, topology_uuid)
+                    for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_delete
+                    if device_uuid in connection_devices
+                ]
             results_deleteendpoint = service_handler.DeleteEndpoint(
                 _endpointids_to_delete, connection_uuid=connection_uuid
             )