Fix bug caused by overzealous refactoring.