Fix and backport tests, too