diff --git a/apps/vpls/src/main/java/org/onosproject/vpls/IntentInstaller.java b/apps/vpls/src/main/java/org/onosproject/vpls/IntentInstaller.java
index d1d1d1a..79ed713 100644
--- a/apps/vpls/src/main/java/org/onosproject/vpls/IntentInstaller.java
+++ b/apps/vpls/src/main/java/org/onosproject/vpls/IntentInstaller.java
@@ -16,7 +16,6 @@
 package org.onosproject.vpls;
 
 import com.google.common.collect.SetMultimap;
-
 import org.apache.commons.lang3.tuple.Pair;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
@@ -101,22 +100,21 @@
                                 .collect(Collectors.toSet());
                         Key brcKey = buildKey(PREFIX_BROADCAST, src, vlanId);
 
-                        if (intentService.getIntent(brcKey) == null && dsts.size() > 0) {
-                            intents.add(buildBrcIntent(brcKey, src, dsts, vlanId));
+                        if (dsts.isEmpty()) {
+                            return;
                         }
 
-                        if (mac != null && countMacInCPoints(cPoints) > 1 &&
-                                dsts.size() > 0) {
+                        intents.add(buildBrcIntent(brcKey, src, dsts, vlanId));
+
+                        if (mac != null && countMacInCPoints(cPoints) > 1) {
                             Key uniKey = buildKey(PREFIX_UNICAST, src, vlanId);
-                            if (intentService.getIntent(uniKey) == null) {
-                                MultiPointToSinglePointIntent uniIntent =
-                                        buildUniIntent(uniKey,
-                                                       dsts,
-                                                       src,
-                                                       vlanId,
-                                                       mac);
-                                intents.add(uniIntent);
-                            }
+                            MultiPointToSinglePointIntent uniIntent =
+                                    buildUniIntent(uniKey,
+                                                   dsts,
+                                                   src,
+                                                   vlanId,
+                                                   mac);
+                            intents.add(uniIntent);
                         }
                     });
                 });
diff --git a/apps/vpls/src/main/java/org/onosproject/vpls/Vpls.java b/apps/vpls/src/main/java/org/onosproject/vpls/Vpls.java
index 298615b..2951d13 100644
--- a/apps/vpls/src/main/java/org/onosproject/vpls/Vpls.java
+++ b/apps/vpls/src/main/java/org/onosproject/vpls/Vpls.java
@@ -100,13 +100,13 @@
 
         setupConnectivity();
 
-        log.debug("Activated");
+        log.info("Activated");
     }
 
     @Deactivate
     public void deactivate() {
         intentSynchronizer.removeIntentsByAppId(appId);
-        log.debug("Deactivated");
+        log.info("Deactivated");
     }
 
     protected void setupConnectivity() {
diff --git a/apps/vpls/src/main/java/org/onosproject/vpls/VplsNeighbourHandler.java b/apps/vpls/src/main/java/org/onosproject/vpls/VplsNeighbourHandler.java
index dad993b..69b8e34 100644
--- a/apps/vpls/src/main/java/org/onosproject/vpls/VplsNeighbourHandler.java
+++ b/apps/vpls/src/main/java/org/onosproject/vpls/VplsNeighbourHandler.java
@@ -126,7 +126,7 @@
                 case REQUEST:
                     interfaceService.getInterfacesByVlan(context.vlan())
                             .stream()
-                            .map(Interface::connectPoint)
+                            .filter(intf -> !context.inPort().equals(intf.connectPoint()))
                             .forEach(context::forward);
                     break;
                 case REPLY:
diff --git a/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java b/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java
index ffc9c09..8f0556c 100644
--- a/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java
+++ b/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java
@@ -17,11 +17,13 @@
 
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.Collectors;
 
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -574,15 +576,15 @@
      */
     private class TestIntentService extends IntentServiceAdapter {
 
-        private Set<Intent> intents;
+        private Map<Key, Intent> intents;
 
         public TestIntentService() {
-            intents = Sets.newHashSet();
+            intents = Maps.newHashMap();
         }
 
         @Override
         public void submit(Intent intent) {
-            intents.add(intent);
+            intents.put(intent.key(), intent);
         }
 
         @Override
@@ -592,12 +594,12 @@
 
         @Override
         public Iterable<Intent> getIntents() {
-            return intents;
+            return intents.values();
         }
 
         @Override
         public Intent getIntent(Key intentKey) {
-            for (Intent intent : intents) {
+            for (Intent intent : intents.values()) {
                 if (intent.key().equals(intentKey)) {
                     return intent;
                 }
