fixes #5755 in master 3.0