fixing upgrade issues