Fix test failures because of header redirect