Fix typos and test failures