Reorder flags