add status codes when rendering 404 and 500 templates