sort the blocks.

sort the blocks.