Support (up|down)grading versions, fix version comparisons