Change a few more places to use `expect`

[ci skip]