correct version and upgrade routine