fix issue 6
Merge pull request #19 from huangjd/master

fix issue 6