Implements #1207
Merge pull request #1210 from emmanuel-keller/master

Implements #1207