Bugfixes for QR code generation