Fixed for ringbuffer