fix #1130
Merge pull request #329 from jygaulier/3.7-fix1130

[3.7] fix #1130