Fix Error 400 and 500 templates