Fix upgrade patches