diff --git a/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java b/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java
index 89dfb30..67458e3 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/bgproute/PatriciaTrie.java
@@ -17,16 +17,16 @@
 
 	@Override
 	public synchronized V put(Prefix prefix, V value) {
+		if (prefix == null || value == null) {
+			throw new NullPointerException();
+		}
+		
 		if (prefix.getPrefixLength() > maxPrefixLength) {
 			throw new IllegalArgumentException(String.format(
 					"Prefix length %d is greater than max prefix length %d", 
 					prefix.getPrefixLength(), maxPrefixLength));
 		}
 		
-		if (prefix == null || value == null) {
-			throw new NullPointerException();
-		}
-		
 		Node node = top;
 		Node match = null;
 		
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java b/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java
index f5728b0..0ecaebe 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntryId.java
@@ -86,7 +86,7 @@
      */
     @Override
     public boolean equals(Object obj){
-	if(obj.getClass() == this.getClass()) {
+	if(obj != null && obj.getClass() == this.getClass()) {
 	    FlowEntryId entry = (FlowEntryId) obj;
 	    return this.value() == entry.value();
 	}
diff --git a/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
index b03aea2..3e4d5bf 100644
--- a/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
@@ -99,7 +99,12 @@
 			//may have since released the request or even begun another request
 			//(this is why we use == to check the object instance is the same)
 			SwitchLeadershipData swData = switches.get(dpid);
-			if (swData != null && swData.getLatch() == latch){
+			if (swData == null) {
+				log.debug("Leadership data {} not found", dpid);
+				return;
+			}
+			
+			if (swData.getLatch() == latch){
 				swData.getCallback().controlChanged(
 						HexString.toLong(dpid), latch.hasLeadership());
 			}
diff --git a/src/main/java/org/openflow/protocol/vendor/OFBasicVendorId.java b/src/main/java/org/openflow/protocol/vendor/OFBasicVendorId.java
index 09365d7..33bb0bd 100644
--- a/src/main/java/org/openflow/protocol/vendor/OFBasicVendorId.java
+++ b/src/main/java/org/openflow/protocol/vendor/OFBasicVendorId.java
@@ -87,7 +87,7 @@
      * @return
      */
     public OFVendorDataType lookupVendorDataType(int vendorDataType) {
-        return dataTypeMap.get(vendorDataType);
+        return dataTypeMap.get((long)vendorDataType);
     }
 
     /**
diff --git a/src/main/java/org/openflow/util/HexString.java b/src/main/java/org/openflow/util/HexString.java
index 07cc1f7..9a656dd 100644
--- a/src/main/java/org/openflow/util/HexString.java
+++ b/src/main/java/org/openflow/util/HexString.java
@@ -47,12 +47,12 @@
         int i = 0;
         for (; i < (padTo * 2 - arr.length); i++) {
             ret.append('0');
-            if ((i % 2) == 1)
+            if ((i & 1) == 1)
                 ret.append(':');
         }
         for (int j = 0; j < arr.length; j++) {
             ret.append(arr[j]);
-            if ((((i + j) % 2) == 1) && (j < (arr.length - 1)))
+            if ((((i + j) & 1) == 1) && (j < (arr.length - 1)))
                 ret.append(':');
         }
         return ret.toString();
