Fix a bug that the bitmap is not cleared when a buffer is reverted.