resync from release-0.8 branch