fix ref count