Fix Templates and GlobalTemplates (OMS-507)