Fixed bug in recent refactoring.