Fix for issue #2016
Merge pull request #2020 from erwinwinder/master

Fix for issue #2016