Fix build errors

Fix some build errors that occurred due to changes in Rust.