use root when reference URI is empty fixes #1