remove queued upgrade + fix upgrade code