Implements #1016
Merge pull request #1048 from emmanuel-keller/1.5

Implements #1016