Fix version updating code