Fixes to ring buffers.