Fix the template: do not use 'global' keyword