Fixes for sound issues in Rust on a separate branch