fix ref count mistake