Total alkalinity control