Merge pull request #969 from jmaas/master

little bugfix and some pep8