fix flake and tests