Renamed templates.templateId to templates.CORE_TEMPLATE_ID