Updated to include upstream changes.