Implements #1225
Merge pull request #1228 from emmanuel-keller/master

Implements #1225