Fix QR code and websocket issues