Fix circular buffer.