bug fixes
Merge pull request #27 from Yaliang/master

bug fixes