Fixing errors after refactoring.