bugfix: processes retained by 'pid' may has refcnt equaling to zero