diff --git a/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java b/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java
index 5f5a2c9007f141d0e71c56c8be7458704c8db4e2..bd187aaf4e2c0e3a35bb7a4095625776b49c8a78 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/I2PSnarkUtil.java
@@ -206,15 +206,15 @@ public class I2PSnarkUtil {
     Destination getDestination(String ip) {
         if (ip == null) return null;
         if (ip.endsWith(".i2p")) {
-            Destination dest = _context.namingService().lookup(ip);
-            if (dest != null) {
-                return dest;
-            } else {
-                try {
-                    return new Destination(ip.substring(0, ip.length()-4)); // sans .i2p
-                } catch (DataFormatException dfe) {
-                    return null;
-                }
+            if (ip.length() < 520) {   // key + ".i2p"
+                Destination dest = _context.namingService().lookup(ip);
+                if (dest != null)
+                    return dest;
+            }
+            try {
+                return new Destination(ip.substring(0, ip.length()-4)); // sans .i2p
+            } catch (DataFormatException dfe) {
+                return null;
             }
         } else {
             try {