Implement #1122
Merge pull request #1125 from emmanuel-keller/master

Implement #1122