An agent is provided for treating keratin-containing fibers, in particular human hair, comprising (a) a cellulose with a cationic structural unit and (b) a copolymer comprising a structural unit of formula (A1), a structural unit of formula (A2) and a structural unit of formula (A3), in which R1, R3 and R7 mutually independently denote a hydrogen atom or a methyl group, R2 denotes a (C1 to C4) alkyl group, R4 denotes a hydroxy-(C2 to C6)-alkyl group, and a cosmetically acceptable carrier.