"If you have problems maintaining magnesium levels as well then add pure dolomite to the reactor to help elevate Mg levels (happens pretty slow).
Dolomite is a mineral containing both calcium and magnesium carbonate, CaMg(CO3)2. As it dissolves it will add both calcium and magnesium.
The amount to add depends on the system demands and configuration of the reactor. It is not uncommon for 10% to 20% of the media used to be dolomite. Monitor and adjust as needed.
Get the dolomite from a reliable source and make sure it is pure."