Made the relative URI resolver more robust