Merge pull request #651 from emmanuel-keller/master

Bug fix and enhancement