fix ref reset