Terminates failed processes