cleanup unref() a little bit