Fix bug: qr code is messed up when opening app the second time.