Fix mistakes when refactoring.