Properly handle relative links