Upgrade debugging, fix upgrade on ARM (fixes #482)