bug fixes
Merge pull request #21 from Yaliang/master

bug fixes