Correct the calculation of the block number to erase.