Fixes #4009
Merge pull request #4012 from mdogan/fix/master/issue-4009

Fixes #4009