Fix upgrade mode not getting set correctly.