Fixed matrices with transpose.

Fixed building in release mode.