Fix updating issue.
Refactor.