Fix error in refactoring.