Fix issue #3865
Merge pull request #3868 from schwabe/issue_3865

Fix issue #3865