modified how expected version is calculated.