fixes #5600 in master 3.0