Fixed 2 upgrade issues