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

fix some bugs.