Fix redirects with flash