Fix issue #2267
Fix issue #2291
Merge pull request #278 from jtraulle/branch-32

Fix issue #2267