Fix #1217
Implements #266
Remove debug info #266
Merge pull request #1221 from emmanuel-keller/1.6

Bug fix and improvement