bug fixed. discard ringbuffer