Small fix when exporting matrix.