fixing the first digest func oldValue.