Backport 7683 stable5