Changed a reference-order bug