fix issue #224
Merge pull request #242 from xiechao06/issue224

fix issue #224