Fix compile and test failures