Fix redirects after error