Thanks, John. You are correct, simple typo. I just submitted a pull request to fix it.
(note that it does not actually impact the results in that example, since they are all at equilibrium, but if one wanted to extend this code to look at actual charge/discharge, it would certain change the results).
Thanks again,
Steven