handle internal links (fixes #145)