fixes issue #3308
Merge remote-tracking branch 'upstream/develop' into issue-3308
Merge pull request #3309 from czpython/issue-3308

fixes issue 3308