Fixed potential infinite loop if zombified processes.
Zombies might not eat your brains, but they will cause my previous code to loop infinitely.