bug fixes
Merge pull request #13 from Yaliang/master

bug fixes