Fixed text template bug