fix 302 redirection