diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
index 715e59967e5486fb3e1d55fb2f538d668ad24518..13f19d0c7a19b6e082e242499b5e89e97757645e 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java
@@ -120,7 +120,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
             l.log("Proxy list is emtpy - no outproxy available");
             return null;
         }
-        int index = I2PAppContext.getGlobalContext().random().nextInt(proxyList.size()-1);
+        int index = I2PAppContext.getGlobalContext().random().nextInt(proxyList.size());
         return (String)proxyList.get(index);
     }