Be sure to only delete the pid in the master. Fixes #334