Fix problem with error pages not getting rendered