debugging ref unref