finish upgrade cancel and hide window