Fix URL generation for the templates.