diff --git a/inc/html.php b/inc/html.php
index 24d108ea43e4d56f18e9c059ff0d1c0a819ff346..d768022ecdc83d076e30a08f42bd109ac74862b4 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -2116,7 +2116,17 @@ function html_admin(){
 
     // print the rest as sorted list
     if(count($menu)){
-        usort($menu, 'p_sort_modes');
+        // sort by name, then sort
+        usort(
+            $menu,
+            function ($a, $b) {
+                $strcmp = strcasecmp($a['prompt'], $b['prompt']);
+                if($strcmp != 0) return $strcmp;
+                if($a['sort'] == $b['sort']) return 0;
+                return ($a['sort'] < $b['sort']) ? -1 : 1;
+            }
+        );
+
         // output the menu
         ptln('<div class="clearer"></div>');
         print p_locale_xhtml('adminplugins');