fixes off-by-1 discrepancy between internally-tracked pid and real pid.
Merge pull request #5 from birkin/master

fixes off-by-1 discrepancy between internally-tracked pid and real pid.