fixes to rel urls code, was trying to use rel offset in string slice