Correctly initialize matrices.