Fix for upgrade failures