Fix issue #3012
Merge pull request #3013 from rzajac/issue-3012

Fix issue #3012