fix some bugs
Merge pull request #4 from gucheen/master

fix some bugs