Created pid instance variable so value can be retained after destroy
Fixes #422
Merge pull request #430 from dchandekstark/422-keep-destroyed-pid

Created pid instance variable so value can be retained after destroy