fix ringbuffer size decrease