Merge pull request #20 from cnnic/master

merge from cnnic
fix bug
Merge pull request #171 from forumbyr/master

fix bug