fix qr scan failure bug