fix ref uri bug