fix reordering problem