The present invention concerns a system and a method for dosing of at least two concentrates into water for on-line preparation of a medical fluid. The system comprises a main line (1) for feeding of water, a first line (2) with a first pump (3) for feeding of a first concentrate into the main line at a first mixing point (4), a second line (5) with a second pump (6) for feeding of a second concentrate into the main line at a second mixing point (7). A main concentration sensor (12) measures the concentration in the main line (1) downstream both the first and the second mixing points. Initially, while not feeding any of the second concentrate, the control of the dosing of the first concentrate is under feedback control from the main concentration sensor (12) to the first pump (3). At a certain point in time a value for a feeding parameter for the first pump (3) is determined and the feedback control from the main concentration sensor (12) is moved, from control of the first pump (3) to control of the second pump (6). Then the value for the feeding parameter is used for control of the first pump (3).