Correctly format error pages as HTML