Implements #1017
Merge pull request #1018 from emmanuel-keller/1.5

Implements #1017