Fix some broken tests due to recent refactoring