Fix api communication process