fix links in templates