Adapt to template changes