Fix errors found by flake8