fixing problem with BufferBase::clear