minor fixes in ringbuffer