Rearranging before packing.

Rearranging before packing.