Fix RingBuffer and add one more test