Changed a way the activity terminator gets a subprocess PID.