fixed transpose functions