diff --git a/network/message/handler.go b/network/message/handler.go
index 1931dc84cc5ba3df09ccf22428411e9f2b44a7b2..a9a387b2c51e2324ffc6c0aafc73b79e79737465 100644
--- a/network/message/handler.go
+++ b/network/message/handler.go
@@ -58,9 +58,11 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
 	preimagelist, exist := edge.Get(identity.Source)
 	if exist{
 		//if it exists, check against all in the list
-		for i:=0;i<len(preimagelist)&&!forMe;i++{
-			forMe = fingerprint2.CheckIdentityFP(ecrMsg.GetIdentityFP(),
-				ecrMsg.GetContents(), preimagelist[i].Data)
+		for key := range preimagelist{
+			if forMe = fingerprint2.CheckIdentityFP(ecrMsg.GetIdentityFP(),
+				ecrMsg.GetContents(), preimagelist[key].Data); forMe{
+				break
+			}
 		}
 	}else{
 		//if it doesnt exist, check against the default fingerprint for the identity