fix auto_templating