Fix uriFragment NPE issue