2 bugs fixes and a minor improvement in the upgradewindow