Fixed errors in the gas-density and water saturation formulas