Fix code broken in refactoring.