bugfix-for-3231
Merge pull request #1333 from kirill-kornyakov:bugfix-for-3231