updated sync to compare key and action.