bug fixes
Merge pull request #14 from Yaliang/master

bug fixes