Corrected typo and pep8 indentation

Rebased and PR to v0.6.x (instead of master)