Bug Fix in ringBuffer