add refcount debug mode