Fix bug in new getRefURI, getDocURI functions