Fixed bug with terminated processes
Fixed bug with multiple processes