Fix bug introduced in previous refactoring.