Corrected bug in error template