fixed  getLocalChanges logic.