Refactoring and correction bug.