little bugfix and some pep8
Merge pull request #969 from jmaas/master

little bugfix and some pep8