patch to fix some problems with links on relative urls