Update 1.8 branch for fix #1565
Update 1.8 branch for fix #1565