Fix test failures, etc.