Fix a few hooks for latest Rust. Thanks @Mughisi