Fix bug about change detection