Fixed transpose functions (I think?)