usb rewritten partly using ringbuffer, bug in ringbuffer still when wrap