Fixed bug introduced during refactoring.