diff --git a/src/main/java/org/onosproject/segmentrouting/NetworkConfigEventHandler.java b/src/main/java/org/onosproject/segmentrouting/NetworkConfigEventHandler.java
index afb7ec9..f32cd2d 100644
--- a/src/main/java/org/onosproject/segmentrouting/NetworkConfigEventHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/NetworkConfigEventHandler.java
@@ -137,12 +137,7 @@
         if (config == null) {
             return ImmutableSet.of();
         }
-
-        HashSet<MacAddress> macAddresses = new HashSet<>();
-        config.vRouterMacs().forEach(mac -> {
-            macAddresses.add(mac);
-        });
-        return ImmutableSet.copyOf(macAddresses);
+        return ImmutableSet.copyOf(config.vRouterMacs());
     }
 
     private boolean isEdge(DeviceId deviceId) {
diff --git a/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java b/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java
index 1beed32..5d48b6d 100644
--- a/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java
+++ b/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java
@@ -59,7 +59,6 @@
     private final Map<VlanId, List<ConnectPoint>> xConnects = new ConcurrentHashMap<>();
     private ApplicationId appId;
     private NetworkConfigService cfgService;
-    private SegmentRoutingAppConfig appConfig;
 
     private class SegmentRouterInfo {
         int nodeSid;
@@ -107,9 +106,6 @@
             allSegmentIds.add(info.nodeSid);
         });
 
-        // Read SegmentRoutingAppConfig
-        appConfig = cfgService.getConfig(appId, SegmentRoutingAppConfig.class);
-
         // Read gatewayIps and subnets from port subject.
         Set<ConnectPoint> portSubjects =
             cfgService.getSubjects(ConnectPoint.class, InterfaceConfig.class);
@@ -367,8 +363,12 @@
 
             ImmutableSet.Builder<Ip4Prefix> builder = ImmutableSet.builder();
             builder.addAll(srinfo.subnets.values());
-            if (appConfig != null && deviceId.equals(appConfig.vRouterId())) {
-                builder.add(Ip4Prefix.valueOf("0.0.0.0/0"));
+            SegmentRoutingAppConfig appConfig =
+                    cfgService.getConfig(appId, SegmentRoutingAppConfig.class);
+            if (appConfig != null) {
+                if (deviceId.equals(appConfig.vRouterId().orElse(null))) {
+                    builder.add(Ip4Prefix.valueOf("0.0.0.0/0"));
+                }
             }
             return builder.build();
         }
@@ -493,10 +493,14 @@
     }
 
     public Set<ConnectPoint> suppressSubnet() {
+        SegmentRoutingAppConfig appConfig =
+                cfgService.getConfig(appId, SegmentRoutingAppConfig.class);
         return (appConfig != null) ? appConfig.suppressSubnet() : ImmutableSet.of();
     }
 
     public Set<ConnectPoint> suppressHost() {
+        SegmentRoutingAppConfig appConfig =
+                cfgService.getConfig(appId, SegmentRoutingAppConfig.class);
         return (appConfig != null) ? appConfig.suppressHost() : ImmutableSet.of();
     }
 }
