-Updated error checking in sizes while reading from Ringbuffer