Pep8 and fix bug for oldpython