Fix panics in more tests