Merge pull request #1166 from eht16/fix_template_error_message