diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js
index 0bb685484efd39191a3da92065721954f447ab30..432a4eb30aef77234ebc98209db0f74bbcb92e32 100644
--- a/lib/plugins/loader.js
+++ b/lib/plugins/loader.js
@@ -83,6 +83,7 @@ class PluginsLoader {
    * @param isRefresh 是否刷新
    */
   async load(isRefresh = false) {
+    this.delCount()
     if (isRefresh) this.priority = []
     if (this.priority.length) return
 
diff --git a/lib/tools/ksr.js b/lib/tools/ksr.js
index 909383395f87fea03e13475594b645c289dd317e..e806a828ef0a1837db37f6ba409b05e965835a6a 100644
--- a/lib/tools/ksr.js
+++ b/lib/tools/ksr.js
@@ -36,10 +36,10 @@ const serverHttpexit = http.createServer(async (req, res) => {
     return
   }
   if (req.url === `/restart`) {
-    await serverProcess.kill();
-    await startServer();
     res.writeHead(200, { 'Content-Type': 'text/plain' });
     res.end('OK\n');
+    await serverProcess.kill();
+    await startServer();
   } else if (req.url === `/exit`) {
     res.writeHead(200, { 'Content-Type': 'text/plain' });
     res.end('OK\n');