fix #7766 fix #7886 Revert 5c4a2f56e5 & fix (cherry picked from commit ce72e89d26)
5c4a2f56e5
ce72e89d26