Pep8 and minor bugfix