Fix upgradecontroller, add backwards compatibility decode_version.