fixed the reordering issue