Draft: fixing a bug in Downgrade tool