Implements #1083
Merge pull request #1086 from emmanuel-keller/master

Implements #1083