Off by one error on valuation calculation