fixes #5673 in master 3.0