Update for the recent rust. For some reason I need to cast u8 to uint.