Fixed redirection for error pages