ticket:5 fix some bugs
ticket:5 pep8