fixed qr code issue and template cleanup