Rearrange: fix a bug