fix reordering