Fixes in refcnt