Fix regressions in tests