fix bugs for refcount leak