Better handling of relative URLs