Fix matrices.