Merge pull request #349 from gloryming/master

fixed bugs