fixed. #2

It was modified to delete the old buffer.