corrections in generating matrix.