fixed typos in templates, minor updates to error reporting