Fixed Uninitialized value on TemplateGenerator.pm.