Fixed integer bug in calc_pH.