Fix redirection on error page