fixed URL reliability in correctly parsing and generating absolute and relative URLs