fixed problem caused by reordering