Fixed check for alive processes.