Method for preparing a medical solution, comprising the steps of a) providing a solution comprising one or more acetylated or deacetylated amino sugar/sugars in at least one compartment of a container at a pH from 2.5 to 5.0, and b) terminal sterilization of said at least one compartment and the contents therein, is disclosed, as well as a solution used for preparing the medical solution, a container containing said solution, and use of said solution for the manufacture of a medicament for peritoneal dialysis.