fix long running script kill