fixed a wrong-order bug