Updated to work with latest Rust