Fixing flake8 warnings