fixed NPE for URI which are not platform URIs