Fixed flake8 test failures