fix for issue #3704 for 3.3.1 branch
unit test update for issue #3704 for 3.3.1 branch
Merge pull request #3707 from serkan-ozal/fix/3.3.1/issue-3704

Backport to 3.3.1 branch Fix/3.3.1/issue 3704