bug fixes
Merge pull request #28 from Yaliang/master

bug fixes