reworked templates to provide errors on all pages