redirect fix for error pages