diff --git a/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/ShutdownHookProcessTracker.java b/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/ShutdownHookProcessTracker.java
index <HASH>..<HASH> 100644
--- a/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/ShutdownHookProcessTracker.java
+++ b/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/ShutdownHookProcessTracker.java
@@ -279,9 +279,8 @@ class ShutdownHookProcessTracker implements ProcessTracker {
          */
         public List<Process> destroyAll(long timeoutPerProcess, TimeUnit unit) {
             synchronized (processes) {
-                List<Process> processes = ImmutableList.copyOf(this.processes);
                 List<Process> undestroyed = new ArrayList<>();
-                Iterator<Process> processIterator = processes.iterator();
+                Iterator<Process> processIterator = ImmutableList.copyOf(this.processes).iterator();
                 while (processIterator.hasNext()) {
                     Process p = processIterator.next();
                     p.destroy();
@@ -303,7 +302,7 @@ class ShutdownHookProcessTracker implements ProcessTracker {
                         log.error("failed to terminated process " + p);
                         undestroyed.add(p);
                     } else {
-                        processes.remove(p);
+                        this.processes.remove(p);
                     }
                 }
                 return undestroyed;
ShutdownHookProcessTracker: remove from field processes list, not tmp immutable list [skip ci]