update invitation template and fix bug in the error template