Fix issue with ProcessManager::wait for spawn process early exit