Fixed bug in the error templates