Updated based on upstream changes.