fix ref ptr unit test error