Used transmute where it wasn't necessary