Fix adding links to related resources

We REALLY need adding tests into this repo to avoid this regressions.