Make setTemplate strict