fixed some bugs
Merge pull request #32 from yyken/master

fixed some bugs