fixed bug on upgrade queries