The present invention relates to compositions, particularly liquid compositions, comprising polypeptides having beta-galactosidase activity, methods of making said compositions, and uses of the compositions for making e.g. dairy products. The polypeptides having beta-galactosidase activity are modified by glycation of lysine and/or arginine residues by incubating the enzyme in the presence of reducing sugars, optionally combined with a heat treatment. Thereby, transgalactosylating activity is increased.