fix refcount issue