fix a crucial bug in the mergeRect -- the erase cause miss of some index