Implementation of #350
Merge pull request #354 from emmanuel-keller/master

Implementation of #350