fix bug and also fix flake8 issues in zues