Fix failed tests as a result of refactoring.