Yup, you answered why fetching the ProcessID in the second script doesn't work, and how to fix it.