fix for issue #3458 on master branch