Ringbuffer fix