Fix broken sequences during upgrade