more attempted bug fixes.

the PID gets messed up between process_execute and process_wait.