Fixed ringbuffer alloc size error