Fixed hang when process is already killed