Fixes for the CI failures

The failures can be reproduced by running the test suite with `--verbosity 2`.