Fix cargo test errors