fix for issue #2040
Merge branch 'master' into develop