fixed call to upgrade templates CRM-12002