Implements #934
Merge pull request #941 from emmanuel-keller/master

Implements #934