Fix several tranposition bugs.