Fix usb discovery code