Fix formatting of matrix.