Fix bugs in lod data reorg util