Updated to work on latest rustc