Fix bug from refactoring process.