Implements #1183
Merge pull request #1187 from emmanuel-keller/master

Implements #1183