Fixed buffer over run error in output to RingBuffer