Added support for resizable buffers.