Added autorun for templates.