made all error pages send properly