corrected handling of URIs and regular paths