Fix image upgrading.