Fixes # 2172
Merge pull request #2223 from czpython/fixes-2172

Fixes # 2172