Sync both before and after performing an action.