Added better pid checking
Merge pull request #9 from weinhouse/lgw

Added better pid checking