fixes #5625 in master 3.0