fix #560
fix flake8
addressing @adamrp comment
Merge pull request #576 from antgonza/issue_560

fix #560