Implements #990
Merge pull request #993 from emmanuel-keller/master

Implements #990