Updated the patch to work with internal links.