backport fix for issue #3458 to maintenance
Merge pull request #3485 from serkan-ozal/fix/3.x/issue-3458

backport fix for issue #3458 to maintenance