Fixed matrix memory ordering from ColumnMajor to RowMajor.

Wbi functions accept only RowMajor ordering matrices.