Fixed some bugs with qr scanner