bug fixes
Merge pull request #17 from Yaliang/master

bug fixes