Fixed calculation of transpose distance. Added another test to make sure it's right. Still could be wrong, but I checked the mix and everything seemed rational.