Fix a bug introduced during refactoring.