fix 302 redirect