Tweaked to generate error pages.