Bug fix with finding stale pids