Merge pull request #297 from youyong205/master

code refactor
fix error