Bugfix where processes were not being terminated.