fix bugs.
Merge pull request #23 from CalvinChen/master

fix bug.