Fix build and test failures