Add pH's latest changes upstream.