fixed some bugs
Merge pull request #10 from huip/master

fixed some bugs