Modified buffer_close to not destroy the buffer.