Bug fix affecting upgrade.