fix some bugs
Merge pull request #4 from zhujy8833/polish

fix some bugs