Thanks lsaffre for the report and simon29, vicould, and Florian Hahn for the patch. Some changes done by committer.