fixed lots of bugs.
Merge pull request #30 from fusijie/master

fixed lots of bugs.