Fixed a QR scan bug