Fixing upgrade problems...