fix the pKas of Mg2+ and added more export variables for debugging