fixed ringbuffer core dump.