Made the error pages work correctly.