Fixed compile and test failures