diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java
index b7d0015eae3d43b715f69869172861a84c785188..6198131057ccb544282369ddd6ba4c2841f9a785 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java
@@ -438,9 +438,6 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
         if (task != null) {
             task.close(forced);
         }
-        StatefulConnectionFilter filter = _filter;
-        if (filter != null)
-            filter.stop();
         synchronized (lock) {
             if (!forced && sockMgr.listSockets().size() != 0) {
                 l.log("There are still active connections!");
@@ -483,6 +480,9 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
     public synchronized boolean destroy() {
         close(true);
         sockMgr.destroySocketManager();
+        StatefulConnectionFilter filter = _filter;
+        if (filter != null)
+            filter.stop();
         return true;
     }