diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ShellService.java b/apps/routerconsole/java/src/net/i2p/router/web/ShellService.java
index 084d1263c1d8960acf935816b903798419c76709..3fdcdb7e1d7cc1daec71db6c7b82b5495755a8e4 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ShellService.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ShellService.java
@@ -104,24 +104,25 @@ public class ShellService implements ClientApp {
 
         String tmp_name = this.getName();
         File pluginDir = new File(_context.getConfigDir(), PLUGIN_DIR + '/' + tmp_name);
-        if (!pluginDir.exists())
+        if (!pluginDir.exists()){
             pluginDir = new File(_context.getConfigDir(), PLUGIN_DIR + '/' + tmp_name+"-"+SystemVersion.getOS()+"-"+SystemVersion.getArch());
-
-        if (!pluginDir.exists()) {
-            pluginDir = new File(_context.getConfigDir(), PLUGIN_DIR + '/' + tmp_name+"-"+SystemVersion.getOS());
-            if (!pluginDir.exists())
-                throw new RuntimeException("Plugin directory does not exist: " + pluginDir.getAbsolutePath());
-            else{
-                this.name = tmp_name+"-"+SystemVersion.getOS();
+            if (!pluginDir.exists()) {
+                pluginDir = new File(_context.getConfigDir(), PLUGIN_DIR + '/' + tmp_name+"-"+SystemVersion.getOS());
+                if (!pluginDir.exists()) {
+                    throw new RuntimeException("Plugin directory does not exist: " + pluginDir.getAbsolutePath());
+                } else {
+                    this.name = tmp_name+"-"+SystemVersion.getOS();
+                    if (_log.shouldDebug())
+                        _log.debug("ShellService: Plugin name revised to match directory: " + this.getName());
+                }
+            } else {
+                this.name = tmp_name+"-"+SystemVersion.getOS()+"-"+SystemVersion.getArch();
                 if (_log.shouldDebug())
                     _log.debug("ShellService: Plugin name revised to match directory: " + this.getName());
             }
-        } else {
-            this.name = tmp_name+"-"+SystemVersion.getOS()+"-"+SystemVersion.getArch();
-            if (_log.shouldDebug())
-                _log.debug("ShellService: Plugin name revised to match directory: " + this.getName());
         }
 
+
         _errorLog = new File(pluginDir, "error.log");
         _outputLog = new File(pluginDir, "output.log");
         _pb.redirectOutput(_outputLog);