fix #116, fix #117
fix #116
Merge pull request #118 from xiechao06/issue116,117

Issue116,117