Implements #1114
Merge pull request #1117 from emmanuel-keller/master

Implements #1114